Crowd is throwing an error regards querying with Hibernate
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
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)
......
http://ptkpl-crowd:8095/crowd/console/secure/directory/browse.action
Version: 3.2.0 (Build:#917 - 2018-04-20)
Total memory: 499 MB
Free memory: 109 MB
Used memory: 389 MB
The Answer:
Postgre Cluster with 2 slave databases, and 1 master.
the Crowd queries the available free pool, and updates it.
while, the master needs to query its slaves regardless of Atlassian Crowd in some timely manner.
When this situation occured:
Crowd syncs directory A, it gets into slave1 at 17:01
Crowd syncs directory A, again, it gets into slave2 at 18:01
Postgre Master syncs to the slaves, getting 2 instances of directory A, at 19:01
Postgre master syncs the slave, pushing to them new directory A instances, at 19:02
Crowd displays log errors, because non unique directory, at 19:03
Solution: I remove one of the Postgre slaves, hoping that it will not get overloaded by requests.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im on a PostgreDB.
Ill see next week how to solve this, and add the erroneous log files to a ticket in crowd support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reporting that. Is there anything else in the log files? Without more context it is hard to figure out what may be the culprit. Crowd support should assist you with this problem.
Best Regards,
Marcin Kempa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ofir gutmacher,
Did you manage to resolve the issue or contact Atlassian Support?
Are you running on MySql database? If so maybe this KB article would help you https://confluence.atlassian.com/crowdkb/synchronization-of-crowd-results-in-error-query-did-not-return-a-unique-result-254739329.html
Best Regards,
Marcin Kempa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.