Crowd will only synchronise initially

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.

Problem

Renaming a user in an external directory will correctly synchronize and update Crowd but the subsequent synchronization to Fisheye/Crucible creates a new user instead of updating the original.

The following appears in the atlassian-fisheye-yyyy-mm-dd.log:

2017-01-04 07:05:56,932 ERROR [schedulerServiceQuartzScheduler_Worker-9 ] com.atlassian.crowd.directory.DbCachingDirectoryPoller DbCachingDirectoryPoller-pollChanges - Error occurred while refreshing the cache for directory [ 2 ].
java.lang.IllegalArgumentException: Multiple entries with same key: 32770:85d635085347d5478a420f68e574fa87=com.atlassian.crowd.model.user.InternalUser@4d1d5900[id=24,name=bstuart,createdDate=2016-12-24 06:32:01.0,updatedDate=2016-12-24 06:32:01.0,active=true,emailAddress=bstuart@atlassian.com,firstName=Paige,lastName=bstuart,displayName=ben Pfleger,credential=com.atlassian.crowd.embedded.api.PasswordCredential@7137be5e[credential=********,encryptedCredential=true],lowerName=bstuart,lowerEmailAddress=bstuart@atlassian.com,lowerFirstName=ben,lowerLastName=bstuart,lowerDisplayName=ben bstuart,directoryId=2,externalId=32770:85d635085347d5478a420f68e574fa87] and 32770:85d635085347d5478a420f68e574fa87=com.atlassian.crowd.model.user.InternalUser@2323452f[id=935,name=bstuart,createdDate=2016-12-24 06:32:01.0,updatedDate=2016-12-24 06:32:01.0,active=true,emailAddress=bstuart@atlassian.com,firstName=ben,lastName=Southwick bstuart,displayName=Ben Stuart Pflege,credential=com.atlassian.crowd.embedded.api.PasswordCredential@7e324893[credential=********,encryptedCredential=true],lowerName=bstuart,lowerEmailAddress=bstuart@atlassian.org,lowerFirstName=ben,lowerLastName=stuart bstuart,lowerDisplayName=ben bstuart,directoryId=2,externalId=32770:85d635085347d5478a420f68e574fa87]

Cause 1

FE-6432 - Getting issue details... STATUS

Cause 2

The external directory in Crowd is configured so that auto update user is set to "false". 

This means that every time user update happens on the LDAP side, Crowd creates a new user instead of updating existing one.

Resolution 1

See workaround in the above bug report. 

Resolution 2

Change the auto update user setting to true and removing all duplicate users in Crowd (via Users page). Duplicates are "old" versions of users which do not exists on LDAP anymore but are stuck in Crowd. You may run a DB query to get all duplicates of external_id and use that data to remove "old" versions of users:

SELECT * FROM cwd_user WHERE external_id in  (SELECT external_id FROM cwd_user GROUP BY external_id HAVING COUNT(*) > 1);

Once only the most recent versions of the users exist in Crowd, the directory should synchronise once again.



Last modified on Jul 31, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.