Confluence failing to sync user directory from Crowd Edited

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

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

477 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you