cancel
Showing results for 
Search instead for 
Did you mean: 

Force a ldap sync

johnnytv
Champ in-the-making
Champ in-the-making
Hello,
I'm experimenting several errors with my AD configuration. I've recovered a backup and when start Alfresco this sync with ldap and work fine, however when restart service log file show the error: Cache update failed.

I found that problem is related with the LDAP synchronization. Exist some way to force a sync?, I've reviewed several documents on Internet and can't execute a resync.
http://wiki.alfresco.com/wiki/The_Synchronization_Subsystem

Some ideas?

PD. Sorry by my english.

Alfresco 4.2.d
5 REPLIES 5

eswbitto
Confirmed Champ
Confirmed Champ
You can restart the alfresco service and that will do a resync.

johnnytv
Champ in-the-making
Champ in-the-making
ESWBitto,
When I restart service, log show "Cache update faile" (see my post: https://forums.alfresco.com/forum/alfresco-website/cache-update-failed-11052013-1754) and not load more.

niketapatel
Star Contributor
Star Contributor
You can trigger sync manually by JMX mbean.

MBeans -> Alfresco -> Schedule -> MonitoredCronTrigger-> syncTrigger ->Operation Tab -> excuteNow()

How to connect alfresco through JMX Please check it - http://wiki.alfresco.com/wiki/JMX

mrogers
Star Contributor
Star Contributor
Why do you think forcing a sync will help?

johnnytv
Champ in-the-making
Champ in-the-making
Hello mrogers,
Thanks for your response, the problem with my Alfresco is:

1. If I restart alfresco service in this moment, this shows the next error and it doesn't start:

2013-11-11 08:14:33,103  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [localhost-startStop-1] get() miss, sechudling and waiting …
2013-11-11 08:14:33,103  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [localhost-startStop-1] get() building from scratch
2013-11-11 08:14:33,104  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [localhost-startStop-1] submit() scheduling job
2013-11-11 08:14:33,105  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Building cache for tenant
2013-11-11 08:14:33,109  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Building cache for tenant ……
2013-11-11 08:14:33,277  ERROR [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Cache update failed (authorityBridgeTableCache).
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
        at java.util.HashMap$KeyIterator.next(HashMap.java:928)
        at org.alfresco.util.BridgeTable.add(BridgeTable.java:288)
        at org.alfresco.util.BridgeTable.addDescendants(BridgeTable.java:184)
        at org.alfresco.util.BridgeTable.addLink(BridgeTable.java:46)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache.doBuildCache(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:76)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache.access$000(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:34)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache$1.execute(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:65)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache$1.execute(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:61)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:447)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache.buildCache(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:60)
        at org.alfresco.repo.security.authority.AuthorityBridgeTableAsynchronouslyRefreshedCache.buildCache(AuthorityBridgeTableAsynchronouslyRefreshedCache.java:34)
        at org.alfresco.repo.cache.AbstractAsynchronouslyRefreshedCache.doRefresh(AbstractAsynchronouslyRefreshedCache.java:464)
        at org.alfresco.repo.cache.AbstractAsynchronouslyRefreshedCache.doCall(AbstractAsynchronouslyRefreshedCache.java:449)
        at org.alfresco.repo.cache.AbstractAsynchronouslyRefreshedCache.call(AbstractAsynchronouslyRefreshedCache.java:414)
        at org.alfresco.repo.cache.AbstractAsynchronouslyRefreshedCache.call(AbstractAsynchronouslyRefreshedCache.java:45)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
2013-11-11 08:14:33,279  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Building cache for tenant
2013-11-11 08:14:33,279  DEBUG [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Building cache for tenant ……
2013-11-11 08:14:33,450  ERROR [repo.cache.AbstractAsynchronouslyRefreshedCache] [asynchronouslyRefreshedCacheThreadPool1] Cache update failed (authorityBridgeTableCache).
java.util.ConcurrentModificationException

More datails: https://forums.alfresco.com/forum/alfresco-website/cache-update-failed-11052013-1754

2. If I restore my backup from 11-04-2013, this not work and show the same error that point 1.
3. I've restored my last usefull backup (11-03-2013), then I start Alfresco service and this Synchronize with AD. After that, I can login in my Alfresco and work whitout problems. If I restart Alfresco, the log file shows the same error in the point 1 "Cache update failed".

4. I tried with other method:
a. First, restore backup
b. Change the values of ldap.synchronization.groupSearchBase and ldap.synchronization.userSearchBase by ou\=people,ou\=department,dc\=mydomain,dc\=com. In the steps 1 and 2, this value points to root AD (dc\=mydomain,dc\=com))
c. Then, I start Alfresco, this load fine.
d. Then, I restart Alfresco and load fine.

I assume that the last synchronization (init at 11-04-2013) has damaged some data, for this reason the log shows "Cache update failed" (https://forums.alfresco.com/forum/alfresco-website/cache-update-failed-11052013-1754).
So, I need to modify the values for ldap.synchronization.groupSearchBase and ldap.synchronization.userSearchBase and force a AD synchronization in the next restart. It's possible?

Let me know if you need more detail.