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

Incremental Synchronization with Crowd Fails when User is Renamed

    XMLWordPrintable

Details

    Description

      Summary

      The incremental Synchronization with Crowd fails under the following conditions:

      • Crowd is connected to an External Directory (Connector).
      • The user has logged into JIRA at least once and synchronized default group memberships.
      • The user is renamed in the external directory.

      Environment

      • JIRA 6.4.11
      • Crowd 2.8.3
      • Win2k8 R2 Active Directory

      Steps to Reproduce

      1. Create the user jsmith on AD.
      2. Connect Crowd 2.8.3 to AD (connector).
      3. Configure Default group memberships on Crowd to a group with access to JIRA (e.g. jira-users or jira-core-users).
      4. Connect JIRA to Crowd with incremental synchronization enabled.
      5. Perform a full synchronization on Crowd and then JIRA - The user jsmith will be visible on JIRA.
      6. Login to JIRA as jsmith - The group memberships will be synchronized and jsmith will be added to the group configured on Crowd's Default group memberships.
      7. Rename the user on AD (e.g. to john.smith).
      8. Synchronize the directory on Crowd - The username will change to john.smith.
      9. Synchronize the Crowd directory on JIRA.

      Expected Results

      The username should be updated to john.smith during the incremental synchronization.

      Actual Results

      The incremental synchronization fails and the following exception is thrown:

      2015-09-28 15:08:28,139 atlassian-scheduler-quartz1.clustered_Worker-2 ERROR anonymous 681x28x1 1mlipxo 192.168.10.174 /secure/SetupLicense.jspa [com.atlassian.scheduler.JobRunnerResponse] Unable to synchronise directory
      com.atlassian.crowd.exception.OperationFailedException: com.atlassian.crowd.exception.MembershipAlreadyExistsException: Membership already exists in directory [10002] from child entity [jsmith] to parent entity [jira-users]
              at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUserToGroup(DbCachingRemoteChangeOperations.java:1336)
              at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addUserToGroup(DirectoryCacheImplUsingChangeOperations.java:189)
              at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseChanges(EventTokenChangedCacheRefresher.java:168)
              at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1097)
              at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:76)
              at com.atlassian.jira.crowd.embedded.JiraDirectorySynchroniser.synchronizeDirectory(JiraDirectorySynchroniser.java:96)
              at com.atlassian.jira.crowd.embedded.JiraDirectorySynchroniser.runJob(JiraDirectorySynchroniser.java:60)
              at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:136)
              at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
              at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
              at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      Caused by: com.atlassian.crowd.exception.MembershipAlreadyExistsException: Membership already exists in directory [10002] from child entity [jsmith] to parent entity [jira-users]
              at com.atlassian.jira.crowd.embedded.ofbiz.OfBizInternalMembershipDao.addUserToGroup(OfBizInternalMembershipDao.java:101)
              at com.atlassian.jira.crowd.embedded.ofbiz.OfBizDelegatingMembershipDao.addUserToGroup(OfBizDelegatingMembershipDao.java:109)
              at com.atlassian.crowd.directory.AbstractInternalDirectory.addUserToGroup(AbstractInternalDirectory.java:911)
              at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUserToGroup(DbCachingRemoteChangeOperations.java:1314)
              ... 12 more
      

      Workaround

      Once the incremental synchronization fails, JIRA will fallback to the full synchronization, which will rename the user successfully.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dconrad Danilo Conrad
              Votes:
              23 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated: