Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-40259

UserAlreadyExistsException During Directory Migration

XMLWordPrintable

      Enabling Copy User on Login Can Result UserAlreadyExistsException During Directory Migration if a user logs in after the directory is created.

      Steps to reproduce:

      1. Create a user in the internal JIRA directory with a name like jira1 and log in.
      2. Create a delegated LDAP Authentication directory with the Copy User on Login option ticked, and put it at the top of the directory list.
      3. Log back in with jira1 user.
      4. Attempt to migrate users from Jira Internal Directory to Delegated LDAP directory, which results in the duplicate user failure shown below.
      Directory migration failed. Error message:
      com.atlassian.crowd.exception.MembershipNotFoundException: The child entity <jira1> is not a member of the parent <jira-users>
      

      Workaround
      Once you're in the state resulting from the steps completed above—there's not an easy resolution. The following steps have been found to fix this issue if you have a good recent back up.

      • Restore from back up.
      • Run the following database query to clear orphaned user child ids in cwd_membership
        delete from cwd_membership where child_id not in (select id from cwd_user)
      • Restart JIRA
      • Run directory migration.

              Unassigned Unassigned
              ddiblasio David Di Blasio
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: