User directory sync fails due to emoticons in the AD description field of groups
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Synchronising Confluence with an external AD directory fails and the following is seen in the UI when synchronization is done:
1
Synchronization failed. See server logs for details.
Upon checking the atlassian-confluence.log
, the following error is seen as the cause of the failure:
1
2
3
4
2021-05-04 14:32:55,129 INFO [Caesium-1-4] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] addGroups added [ 0 ] groups successfully in [ 1196ms ]
2021-05-04 14:32:55,184 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions Incorrect string value: '\xF0\x9F\x98\x8A\xF0\x9F...' for column 'description' at row 1
2021-05-04 14:32:55,184 ERROR [Caesium-1-4] [atlassian.confluence.event.BatchingMultiEventPublisher] publishAll Failed to flush existing session. Unable to publish events
net.sf.hibernate.exception.GenericJDBCException: could not execute statement
The ERROR records indicate that Confluence is detecting a string value that it cannot accept for the description field of groups. These string values represent emoticons.
Diagnosis
In Confluence: Head over to General Configuration >> User Directories
In front of an AD directory, a failure message is seen like the following:
1
Synchronization failed. See server logs for details.
Attempting to manually synchronise will also return the above message.
Checking the
atlassian-confluence.log
Error records such as the following is seen:
1
2
3
4
2021-05-04 14:32:55,129 INFO [Caesium-1-4] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] addGroups added [ 0 ] groups successfully in [ 1196ms ]
2021-05-04 14:32:55,184 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions Incorrect string value: '\xF0\x9F\x98\x8A\xF0\x9F...' for column 'description' at row 1
2021-05-04 14:32:55,184 ERROR [Caesium-1-4] [atlassian.confluence.event.BatchingMultiEventPublisher] publishAll Failed to flush existing session. Unable to publish events
net.sf.hibernate.exception.GenericJDBCException: could not execute statement
Cause
Confluence does not accept emoticons for group description. As such, when it encounters these values it will stop synchronisation and will return the above error records in both the UI and the logs.
Solution
Please contact your LDAP administrator and ensure that the description fields of all the groups being synchronised does not contain any emoticons.
To find the exact point where synchronisation fails by enabling SQL Logging in Confluence and attempting the synchronisation again. With SQL logging enabled, you can spot the last SQL query that was attempted before synchronisation failed. This will indicate the "description" value that caused the failure.
Was this helpful?