Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Confluence failing to sync user directory from Crowd


We have had Confluence syncing user directory from Crowd for the last several months, and all of a sudden it started to fail synchronization. We have 2 directories defined in Crowd - an Active Directory and a custom directory implemented using the RemoteDirectory interface of Crowd. It had been working with no issues until recently. We have JIRA and Confluence syncing user directories from the same instance of Crowd. JIRA is still functioning with no problems, but Confluence started to fail in synchronization. in every attempt of syncing, it takes over 10 minutes and fail. The fact that JIRA is not affected tells me that the problem may lie on Confluence end.  We are using Confluence version 6.1.2.

Can anyone please help me resolve this.  Here is the log information with stack trace:

2017-10-23 08:17:01,698 INFO [Caesium-1-1] [] synchroniseCache INCREMENTAL synchronisation for directory [ 3604481 ] starting
2017-10-23 08:17:01,703 INFO [Caesium-1-1] [] synchroniseCache Attempting INCREMENTAL synchronisation for directory [ 3604481 ]
2017-10-23 08:17:01,703 INFO [Caesium-1-1] [] synchroniseCache Incremental synchronisation for directory [ 3604481 ] was not completed, falling back to a full synchronisation
2017-10-23 08:17:01,703 INFO [Caesium-1-1] [] synchroniseCache INCREMENTAL synchronisation for directory [ 3604481 ] was not successful, attempting FULL
2017-10-23 08:17:06,576 INFO [Caesium-1-1] [directory.ldap.cache.RemoteDirectoryCacheRefresher] findAllRemoteUsers found [ 268 ] remote users in [ 4812 ms ]
2017-10-23 08:17:06,589 INFO [Caesium-1-1] [] deleteCachedUsersNotIn scanned and compared [ 268 ] users for delete in DB cache in [ 8ms ]
2017-10-23 08:17:06,589 INFO [Caesium-1-1] [] deleteCachedUsersNotIn scanned for deleted users in [ 8ms ]
2017-10-23 08:17:06,607 INFO [Caesium-1-1] [] getUsersToAddAndUpdate scanning [ 268 ] users to add or update
2017-10-23 08:17:06,614 INFO [Caesium-1-1] [] addOrUpdateCachedUsers scanned and compared [ 268 ] users for update in DB cache in [ 19ms ]
2017-10-23 08:17:06,630 INFO [Caesium-1-1] [] addOrUpdateCachedUsers synchronised [ 268 ] users in [ 35ms ]
2017-10-23 08:17:06,959 INFO [Caesium-1-1] [directory.ldap.cache.RemoteDirectoryCacheRefresher] findAllRemoteGroups found [ 157 ] remote groups in [ 329 ms ]
2017-10-23 08:17:06,969 INFO [Caesium-1-1] [] deleteCachedGroupsNotIn scanned and compared [ 157 ] groups for delete in DB cache in [ 6ms ]
2017-10-23 08:17:06,975 INFO [Caesium-1-1] [] addOrUpdateCachedGroups scanning [ 157 ] groups to add or update
2017-10-23 08:17:06,986 INFO [Caesium-1-1] [] findGroupsToUpdate scanned and compared [ 157 ] groups for update in DB cache in [ 6ms ]
2017-10-23 08:17:07,017 INFO [Caesium-1-1] [] addOrUpdateCachedGroups synchronized [ 157 ] groups in [ 42ms ]
2017-10-23 08:17:10,072 INFO [Caesium-1-1] [directory.ldap.cache.AbstractCacheRefresher] synchroniseAllGroupAttributes finished group attribute sync with 0 failures in [ 3054ms ]
2017-10-23 08:27:10,109 INFO [Caesium-1-1] [] synchroniseCache failed synchronisation complete for directory [ 3604481 ] in [ 608411ms ]
2017-10-23 08:27:10,150 ERROR [Caesium-1-1] [] pollChanges Error occurred while refreshing the cache for directory [ 3604481 ].
com.atlassian.crowd.exception.OperationFailedException: Read timed out
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.doRunJob(
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.lambda$runJob$0(
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.runJob(
at com.atlassian.scheduler.core.JobLauncher.runJob(
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(
at com.atlassian.scheduler.core.JobLauncher.launch(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(
Caused by: Read timed out
at Method)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(
at org.apache.http.protocol.HttpRequestExecutor.execute(
at org.apache.http.impl.execchain.MainClientExec.execute(
at org.apache.http.impl.client.cache.CachingExec.callBackend(
at org.apache.http.impl.client.cache.CachingExec.handleCacheMiss(
at org.apache.http.impl.client.cache.CachingExec.execute(
at org.apache.http.impl.execchain.ProtocolExec.execute(
at org.apache.http.impl.execchain.RetryExec.execute(
at org.apache.http.impl.execchain.RedirectExec.execute(
at org.apache.http.impl.client.InternalHttpClient.doExecute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
... 27 more

1 answer

1 accepted

1 vote
Answer accepted

We have resolved this issue.  This was a timeout being caused by a very slow method in the implementation of RemoteDirectory interface in Crowd.  We have implemented RemoteDirectory interface in Crowd in order to implement a custom user directory from our database.  A recent change in one of the methods made it too slow.  We fixed that method and the timeout issue is fixed.  However, JIRA was not affected by this because JIRA, for some unknown reason, was not making the calls to the slow method, and Confluence was.

Hi Rizwan,
Can you please provide more information about your fix (the method) and what means "remoteDirectory interface". Is it related to the time out of the user/admin session in Crowd interface.? Because I am facing sync error whith a similar configuration that yours and the time out in Crowd is very very short.

Thanks in advance


Where did you find the logs? i am unable to locate the logs and which file to refer

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Watch 4 Confluence apps compete for Best App Demo in September's Appy Hours

Calling all collaborators! Appy Hours on the Atlassian Community is a monthly event where 4 Partner and app vendor presenters go head-to-head with 5-minute demos for the title of Best App Demo. I...

474 views 0 12
Read article

Atlassian Community Events