• Community
  • Products
  • Jira
  • Questions
  • How do I address not being able to synchronize JIRA with CROWD causing user access and permissions to projects problems.

How do I address not being able to synchronize JIRA with CROWD causing user access and permissions to projects problems.

Brian Paulick October 2, 2011

JIRA 4.3 is configured to use Crowd 2.2 for authorization and after adding/configuring users to existing groups those users are still unable to login or access the appropriate projects within JIRA. After reviewing the JIRA logs the following error was discovered:
The following i2011-10-03 14:11:00,491 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectory] full synchronisation for directory [ 2 ] starting
2011-10-03 14:11:00,616 QuartzWorker-1 INFO ServiceRunner [directory.ldap.cache.RemoteDirectoryCacheRefresher] found [ 60 ] remote users in [ 109ms ]
2011-10-03 14:11:00,616 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanning [ 60 ] users to add or update
2011-10-03 14:11:00,616 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanned and compared [ 60 ] users for update in DB cache in [ 0ms ]
2011-10-03 14:11:00,632 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] synchronised [ 60 ] users in [ 16ms ]
2011-10-03 14:11:00,632 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanned and compared [ 60 ] users for delete in DB cache in [ 0ms ]
2011-10-03 14:11:00,632 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanned for deleted users in [ 0ms ]
2011-10-03 14:11:00,773 QuartzWorker-1 INFO ServiceRunner [directory.ldap.cache.RemoteDirectoryCacheRefresher] found [ 37 ] remote groups in [ 141ms ]
2011-10-03 14:11:00,773 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanning [ 37 ] groups to add or update
2011-10-03 14:11:00,788 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] scanned and compared [ 37 ] groups for update in DB cache in [ 15ms ]
2011-10-03 14:11:00,804 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] added [ 1 ] groups in [ 16ms ]
2011-10-03 14:11:00,804 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectoryCache] synchronized [ 37 ] groups in [ 31ms ]
2011-10-03 14:11:00,804 QuartzWorker-1 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectory] synchronisation complete in [ 313ms ]
2011-10-03 14:11:00,960 QuartzWorker-1 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 2 ].
com.atlassian.crowd.embedded.ofbiz.db.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,11704][groupName,jira-developers ][updatedDate,2011-10-03 14:11:00.788][description,][directoryId,2][lowerDescription,][active,1][local,0][type,GROUP][lowerGroupName,jira-developers ][createdDate,2011-10-03 14:11:00.788] (SQL Exception while executing the following:INSERT INTO cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry 'jira-developers -2' for key 'uk_group_name_dir_id'))
at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:167)
at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:154)
at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.add(OfBizGroupDao.java:140)
at com.atlassian.crowd.embedded.ofbiz.OfBizGroupDao.addAll(OfBizGroupDao.java:134)
at com.atlassian.crowd.directory.CachingDirectory.addAllGroups(CachingDirectory.java:101)
at com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache.addOrUpdateCachedGroups(DbCachingRemoteDirectoryCache.java:398)
at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllGroups(RemoteDirectoryCacheRefresher.java:84)
at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:36)
at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:568)
at com.atlassian.crowd.manager.directory.DirectorySynchroniserHelperImpl.synchronise(DirectorySynchroniserHelperImpl.java:80)
at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:59)
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)
Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Group][id,11704][groupName,jira-developers ][updatedDate,2011-10-03 14:11:00.788][description,][directoryId,2][lowerDescription,][active,1][local,0][type,GROUP][lowerGroupName,jira-developers ][createdDate,2011-10-03 14:11:00.788] (SQL Exception while executing the following:INSERT INTO cwd_group (ID, group_name, lower_group_name, active, local, created_date, updated_date, description, lower_description, group_type, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry 'jira-developers -2' for key 'uk_group_name_dir_id'))
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:156)
at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:121)
at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63)
at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:489)
at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:469)
at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77)
at com.atlassian.crowd.embedded.ofbiz.db.OfBizHelper.createValue(OfBizHelper.java:162)

Any help would be greatly appreciated

2 answers

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2011

The root cause is a duplicate key in the database for tyhe group JiraDevelopers.

What is crowd using (LDAP, AD, or internal)?

How are you adding new users (Jira or Crowd)?

I would try deleting the conflicting group from the cwd_group table. Alternately it might be easier to create a new directory in Jira, pointing to Crowd, and disable/remove the old one.

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2011

Also, this might be an issue worth raising to support support.atlassian.com

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2011

The root cause is a duplicate key in the database for tyhe group JiraDevelopers.

What is crowd using (LDAP, AD, or internal)?

How are you adding new users (Jira or Crowd)?

I would try deleting the conflicting group from the cwd_group table. Alternately it might be easier to create a new directory in Jira, pointing to Crowd, and disable/remove the old one.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events