ldap sync failed in my confluence staging server environment
Asked by Santhosh Vegolam:

We are using confluence 5.10.9 when click on ldap server synchronize it gives failed please refer server logs after 6-10 secs

under ldap server we are using Novell eDirectory Server

please suggest how to fix it and request you to provide solution

server logs shows as below:

```
2018-07-12 1 22 43,010 INFO [http-nio-8090-exec-3] [embedded.admin.list.DirectoriesController] sync User directory synchronisation requested? [ LDAP server ], type? [ CONNECTOR ]

2018-07-12 1 22 43,052 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache INCREMENTAL synchronisation for directory [ 360450 ] starting

2018-07-12 1 22 43,053 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache Attempting INCREMENTAL synchronisation for directory [ 360450 ]

2018-07-12 1 22 43,053 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache Incremental synchronisation for directory [ 360450 ] was not completed, falling back to a full synchronisation

2018-07-12 1 22 43,053 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache INCREMENTAL synchronisation for directory [ 360450 ] was not successful, attempting FULL

2018-07-12 1 22 44,599 INFO [Caesium-1-1] [crowd.directory.ldap.SpringLdapTemplateWrapper] call Timed call for search with handler on ou=users,o=rackspace took 1544ms

2018-07-12 1 22 44,599 INFO [Caesium-1-1] [directory.ldap.cache.RemoteDirectoryCacheRefresher] findAllRemoteUsers found [ 7612 ] remote users in [ 1546 ms ]

2018-07-12 1 22 47,388 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] deleteCachedUsersNotIn scanned and compared [ 7612 ] users for delete in DB cache in [ 2786ms ]

2018-07-12 1 22 47,389 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteChangeOperations] deleteCachedUsersNotIn scanned for deleted users in [ 2787ms ]

2018-07-12 1 22 50,251 INFO [Caesium-1-1] [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] addOrUpdateCachedUsers scanned and compared [ 7612 ] users for update in DB cache in [ 2786ms ]

2018-07-12 1 22 50,252 INFO [Caesium-1-1] [atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations] addOrUpdateCachedUsers synchronised [ 7612 ] users in [ 2787ms ]

2018-07-12 1 22 50,252 INFO [Caesium-1-1] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache failed synchronisation complete for directory [ 360450 ] in [ 7200ms ]

2018-07-12 1 22 50,272 ERROR [Caesium-1-1] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 360450 ].
```

thanks


Answers:
author: santhosh kumar
body: please ignore this msg

comments: author: Mikael Sandberg
body: It has to be a new user directory, disable and enable will not do it. Just follow the steps on how to [Configure User Directories](https://confluence.atlassian.com/conf510/configuring-user-directories-829077940.html) to setup a new directory.


author: santhosh kumar
body: Thank u for quicker response

it is not a new directory it is a old one only but From last 10 days this issue will hapening sync failed the logs showing ng like this whatever i sent in earlier

so please suggest which is the best resolution for fix my issue

Thanks


author: Mikael Sandberg
body: Please look at the two KBs I linked too, both of them have suggested workarounds. One workaround is to delete the existing user directory and recreate it.


author: santhosh kumar
body: Hi Mikael,

I tried both kBs and also in cache management flush all jobs also but not issue is not resolved

And request you to how to change a node names in conflunce clustering which file i modified please suggest

Thanks


author: Mikael Sandberg
body: The excerpt from your log is not showing it, but check out the KBs below and see if it is because of duplicate entries

<https://confluence.atlassian.com/confkb/synchronization-with-external-directory-fails-with-error-query-did-not-return-unique-result-due-to-duplicate-groups-838543854.html>

<https://confluence.atlassian.com/confkb/directory-synchronisation-with-crowd-fails-regarding-duplicate-entries-in-database-598839212.html>

comments: author: santhosh kumar
body: Thank u and it will fix through ldap settings or through database level changes required for this issue fix

Thanks


author: Mikael Sandberg
body: It depends, you could try setting up a copy of your existing user directory in Confluence and see if that works, that is the suggested workaround in the second KB. If that does not do it you may have to fix it in the database.


Tags: confluence-server

server