-
Bug
-
Resolution: Fixed
-
Low
-
3.2.0, 3.3.2, 3.3.3
-
5
-
Severity 3 - Minor
-
1
-
Issue Summary
Synchronization sometimes failed, in the logs we can see the error failed at the findActiveInne method. The following errors appear in the logs if there are more than one records returns in cwd_synchronisation_status table in the database.
Steps to Reproduce
N/A
Expected Results
synchronization successful without any problem
Actual Results
The below exception is thrown in the atlassian-crowd.log file:
org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.query.internal.AbstractProducedQuery.uniqueElement(AbstractProducedQuery.java:1487) at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1457) at com.atlassian.crowd.dao.directory.DirectorySynchronisationStatusDAOHibernate.findActiveInner(DirectorySynchronisationStatusDAOHibernate.java:29) at com.atlassian.crowd.dao.directory.DirectorySynchronisationStatusDAOHibernate.findActiveForDirectory(DirectorySynchronisationStatusDAOHibernate.java:23)
Workaround
The following steps should do the trick as it will remove the unfinished syncs from the DB:
- Shutdown Crowd.
- Run the following query against the database where Crowd runs:
SELECT * FROM cwd_synchronisation_status;
- Confirm that rows are shown (all with statuses different than "SUCCESS_FULL")
- When confident, run the following query:
DELETE FROM cwd_synchronisation_status WHERE id IN (<run on each directory ID that is giving us issues>);
- Run the following to confirm we now have only one row per directory:
SELECT * FROM cwd_synchronisation_status;
- Start Crowd and check if the issue is resolved.
- mentioned in
-
Page Failed to load
[CWD-5429] multiple results in cwd_synchronisation_status table cause directory synchronisation failed
Remote Link | Original: This issue links to "Page (Atlassian Documentation)" [ 505597 ] |
Remote Link | New: This issue links to "Page (Confluence)" [ 530188 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Waiting for Release [ 12075 ] | New: Closed [ 6 ] |
Remote Link | New: This issue links to "Page (Atlassian Documentation)" [ 505597 ] |
Support reference count | Original: 4 | New: 5 |
Status | Original: In Progress [ 3 ] | New: Waiting for Release [ 12075 ] |
Status | Original: Long Term Backlog [ 12073 ] | New: In Progress [ 3 ] |
Fix Version/s | New: 4.2.0 [ 92192 ] | |
Fix Version/s | New: 4.1.2 [ 92395 ] | |
Fix Version/s | New: 4.0.4 [ 92396 ] |
Status | Original: Needs Triage [ 10030 ] | New: Long Term Backlog [ 12073 ] |
Labels | New: crowd-triage-dev |