java.lang.IllegalArgumentException: duplicate key: duplicatedGroupName

Atlassian JIRA | Tim Wong [Atlassian] | 5 years ago
  1. 0

    Whatever the administrator enters in as the "Group name attribute" must be unique for all groups in the LDAP server. Typically this is the "CN" attribute. In the event that two different entities in LDAP are found with the same value for that attribute (CN), you receive the following stack trace. {code} 2011-09-01 00:26:43,979 ERROR [QuartzScheduler_Worker-2] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 142802946 ]. java.lang.IllegalArgumentException: duplicate key: duplicatedGroupName at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196) at com.google.common.collect.Maps.uniqueIndex(Maps.java:456) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) {code} Excluding these duplicates from the sync is not possible due to the fact that we can't control the order in which groups are returned from the LDAP server. If the ordering were to change between syncs, the memberships could keep changing on the Confluence side. The solution to this problem is to amalgamate memberships for groups which share the same name on the remote server. We should make this an option in the LDAP configuration.

    Atlassian JIRA | 5 years ago | Tim Wong [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: duplicatedGroupName
  2. 0

    Whatever the administrator enters in as the "Group name attribute" must be unique for all groups in the LDAP server. Typically this is the "CN" attribute. In the event that two different entities in LDAP are found with the same value for that attribute (CN), you receive the following stack trace. {code} 2011-09-01 00:26:43,979 ERROR [QuartzScheduler_Worker-2] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 142802946 ]. java.lang.IllegalArgumentException: duplicate key: duplicatedGroupName at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196) at com.google.common.collect.Maps.uniqueIndex(Maps.java:456) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) {code} Excluding these duplicates from the sync is not possible due to the fact that we can't control the order in which groups are returned from the LDAP server. If the ordering were to change between syncs, the memberships could keep changing on the Confluence side. The solution to this problem is to amalgamate memberships for groups which share the same name on the remote server. We should make this an option in the LDAP configuration.

    Atlassian JIRA | 5 years ago | Tim Wong [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: duplicatedGroupName
  3. 0

    Crowd 2.3.3 seems to have a problem syncing user memberships from LDAP (using Connector). h3.Tests: I personally tested this with Apache Directory Server 1.5, using the same settings as my LDAP connector in Crowd 2.1.1 (which is working fine). I tried enabling and disabling *Node Referrals*, *Nested Groups*, *Use the User Membership Attribute*, *Use Paged Results*, *Naive DN Matching*, and made sure that I configured the user and group as well as membership attributes according to my Crowd 2.1.1 settings that works fine. Nothing seems to work, groups and users are pulled accordingly, but memberships are not. h3.Log output: {code} 2011-10-05 14:23:47,440 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] synchronisation for directory [ 32770 ] starting 2011-10-05 14:23:47,661 scheduler_Worker-4 INFO [directory.ldap.util.DirectoryAttributeRetriever] Unsafe or Blank attribute value for attribute <mail>: ' '. 2011-10-05 14:23:47,697 scheduler_Worker-4 INFO [directory.ldap.util.DirectoryAttributeRetriever] Unsafe or Blank attribute value for attribute <mail>: ' '. 2011-10-05 14:23:47,698 scheduler_Worker-4 INFO [directory.ldap.cache.RemoteDirectoryCacheRefresher] found [ 16 ] remote users in [ 258ms ] 2011-10-05 14:23:47,701 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteChangeOperations] scanning [ 16 ] users to add or update 2011-10-05 14:23:47,703 scheduler_Worker-4 INFO [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] scanned and compared [ 16 ] users for update in DB cache in [ 5ms ] 2011-10-05 14:23:47,703 scheduler_Worker-4 INFO [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] synchronised [ 16 ] users in [ 5ms ] 2011-10-05 14:23:47,707 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteChangeOperations] scanned and compared [ 16 ] users for delete in DB cache in [ 3ms ] 2011-10-05 14:23:47,707 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteChangeOperations] scanned for deleted users in [ 3ms ] 2011-10-05 14:23:47,740 scheduler_Worker-4 INFO [directory.ldap.cache.RemoteDirectoryCacheRefresher] found [ 11 ] remote groups in [ 31ms ] 2011-10-05 14:23:47,740 scheduler_Worker-4 INFO [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] scanning [ 11 ] groups to add or update 2011-10-05 14:23:47,744 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteChangeOperations] scanned and compared [ 11 ] groups for update in DB cache in [ 3ms ] 2011-10-05 14:23:47,747 scheduler_Worker-4 INFO [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] synchronized [ 11 ] groups in [ 7ms ] 2011-10-05 14:23:47,751 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteChangeOperations] scanned and compared [ 11 ] groups for delete in DB cache in [ 4ms ] 2011-10-05 14:23:47,752 scheduler_Worker-4 INFO [atlassian.crowd.directory.DbCachingRemoteDirectory] full synchronisation complete in [ 312ms ] 2011-10-05 14:23:47,781 scheduler_Worker-4 ERROR [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 32770 ]. java.lang.IllegalArgumentException: duplicate key: confluence-users at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196) at com.google.common.collect.Maps.uniqueIndex(Maps.java:456) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:44) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:619) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {code} Removing the duplicate key from the database and re-syncing removes that particular error, but the memberships are still not synced. h3.Note This issue affects Active Directory as well, as reported by one of my customer. He has a pretty similar log output as well.

    Atlassian JIRA | 5 years ago | Foogie Sim [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: confluence-users
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In 4.4.1 we have users which have duplicate accounts because of their separate account which is in a sub-domain. I have given the User Directory Sync the base DN, but it should not traverse to the sub-domain unless i explicitly tell it to do so. All other applications which search LDAP for Microsoft AD do not traverse to any sub-domains unless you tell it to do so. This is causing even more issues when i tested an upgrade to 4.4.3. In 4.4.3 the User Directory Sync will not even run successfully because it gets to a group which is also in the sub-domain and throws an error. 2011-10-26 09:26:31,445 QuartzWorker-0 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10000 ]. java.lang.IllegalArgumentException: duplicate key: Guests at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196) at com.google.common.collect.Maps.uniqueIndex(Maps.java:456) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:44) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:223) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:619) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) This is going to cause major issues and hence prevents us from even thinking about upgrading to any newer version than 4.4.1. I have also looked into using the LDAP filter to filter out the sub-domain or only filter in the OUs that i want to Sync, but that is impossible. Due to the LDAP standard for Microsoft AD, you cannot use wildcards when filtering by distinguishedName, so it can't be filtered by OU by that method.

    Atlassian JIRA | 5 years ago | Adam Barylak
    java.lang.IllegalArgumentException: duplicate key: Guests
  6. 0

    When doing a sync in JIRA against an AD with two groups of the same name (but in different parts of the tree) you get an exception: {noformat} 2011-11-25 10:42:59,893 QuartzWorker-0 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 10000 ]. java.lang.IllegalArgumentException: duplicate key: confluence-users at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196) at com.google.common.collect.Maps.uniqueIndex(Maps.java:456) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126) at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:44) at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:223) at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:619) at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {noformat} This stops any group memberships from being synchronised into JIRA.

    Atlassian JIRA | 5 years ago | Brenden Bain [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: confluence-users

  1. eti22 6 times, last 2 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    duplicate key: duplicatedGroupName

    at com.google.common.collect.RegularImmutableMap.<init>()
  2. Guava
    Maps.uniqueIndex
    1. com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62)
    2. com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:210)
    3. com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:196)
    4. com.google.common.collect.Maps.uniqueIndex(Maps.java:456)
    4 frames
  3. com.atlassian.crowd
    AbstractCacheRefresher.synchroniseMemberships
    1. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126)
    1 frame