java.lang.IllegalArgumentException: duplicate key: confluence-users

Atlassian JIRA | Brenden Bain [Atlassian] | 5 years ago
  1. 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
  2. 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
  3. 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
  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

    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

  1. eti22 6 times, last 3 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: confluence-users

    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
    DirectoryPollerJob.execute
    1. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseMemberships(AbstractCacheRefresher.java:126)
    2. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:44)
    3. com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:223)
    4. com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:619)
    5. com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)
    6. com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)
    7. com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJob.execute(DirectoryPollerJob.java:34)
    7 frames
  4. quartz
    JobRunShell.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:195)
    1 frame
  5. com.atlassian.multitenant
    MultiTenantThreadPool$MultiTenantRunnable.run
    1. com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
    1 frame
  6. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    1 frame