Microsoft Active Directory Synch Error
Asked by Bastian Kippelt:

Hi,

i want to use a Microsoft Active Directory. The Test is successful but the Synch faults:

```
2014-05-16 09:17:17,205 ERROR [http-80-7] [crowd.manager.application.ApplicationServiceGeneric] authenticateUser Directory 'mycompany dc01 Active-Directory-Server' is not functional during authentication of 'testadmin'. Skipped. -- referer: http://localhost/authenticate.action?destination=%2Fplugins%2Fservlet%2Fembedded-crowd%2Fdirectories%2Fedit%3FdirectoryId%3D120258561%26atl_token%3Db107512affe46a991ce772545506fe2d9b596e3a | url: /doauthenticate.action | userName: testadmin | action: doauthenticate2014-05-16 09:17:58,474 WARN [http-80-6] [org.springframework.beans.TypeConverterDelegate] findDefaultEditor PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory! -- referer: http://localhost/plugins/servlet/embedded-crowd/configure/ldap/?xsrfTokenName=atl_token&amp;xsrfTokenValue=b107512affe46a991ce772545506fe2d9b596e3a&amp;directoryId=120258561 | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: testadmin2014-05-16 09:17:58,479 INFO [http-80-6] [crowd.embedded.admin.ConfigurationController] doInTransaction User directory updated: [ mycompany dc01 Active-Directory-Server ], type: [ CONNECTOR ]2014-05-16 09:18:03,589 INFO [scheduler_Worker-6] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache synchronisation for directory [ 120258561 ] starting2014-05-16 09:18:04,581 INFO [http-80-1] [embedded.admin.list.DirectoriesController] withDirectory User directory disabled: [ mycompany dc01 Active-Directory-Server ], type: [ CONNECTOR ]2014-05-16 09:18:10,480 INFO [http-80-6] [embedded.admin.list.DirectoriesController] withDirectory User directory enabled: [ mycompany dc01 Active-Directory-Server ], type: [ CONNECTOR ]2014-05-16 09:18:47,011 INFO [scheduler_Worker-6] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache failed synchronisation complete for directory [ 120258561 ] in [ 43422ms ]2014-05-16 09:18:47,322 ERROR [scheduler_Worker-6] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 120258561 ].com.atlassian.crowd.exception.OperationFailedException: java.util.concurrent.ExecutionException: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]]	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllUsers(UsnChangedCacheRefresher.java:166)	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:78)	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:126)	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1008)	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:75)	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29)	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)	at org.quartz.core.JobRunShell.run(JobRunShell.java:199)	at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:20)	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)Caused by: java.util.concurrent.ExecutionException: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]]	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)	at java.util.concurrent.FutureTask.get(Unknown Source)	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllUsers(UsnChangedCacheRefresher.java:148)	... 10 moreCaused by: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]]	at com.atlassian.crowd.directory.SpringLDAPConnector.pageSearchResults(SpringLDAPConnector.java:408)	at com.atlassian.crowd.directory.SpringLDAPConnector.searchEntitiesWithRequestControls(SpringLDAPConnector.java:443)	at com.atlassian.crowd.directory.SpringLDAPConnector.searchEntities(SpringLDAPConnector.java:426)	at com.atlassian.crowd.directory.SpringLDAPConnector.searchUserObjects(SpringLDAPConnector.java:646)	at com.atlassian.crowd.directory.SpringLDAPConnector.searchUsers(SpringLDAPConnector.java:1050)	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher$1.call(UsnChangedCacheRefresher.java:102)	at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher$1.call(UsnChangedCacheRefresher.java:97)	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)	at java.util.concurrent.FutureTask.run(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at java.lang.Thread.run(Unknown Source)Caused by: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]]	at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:205)	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:315)	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$4.call(LdapTemplateWithClassLoaderWrapper.java:99)	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper$4.call(LdapTemplateWithClassLoaderWrapper.java:96)	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.invokeWithContextClassLoader(LdapTemplateWithClassLoaderWrapper.java:54)	at com.atlassian.crowd.directory.ldap.LdapTemplateWithClassLoaderWrapper.search(LdapTemplateWithClassLoaderWrapper.java:96)	at com.atlassian.crowd.directory.SpringLDAPConnector.pageSearchResults(SpringLDAPConnector.java:372)	... 11 moreCaused by: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]]	at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(Unknown Source)	at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(Unknown Source)	at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:295)	... 17 moreCaused by: javax.naming.CommunicationException: d-velop.de:636 [Root exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.]	at com.sun.jndi.ldap.LdapReferralContext.&lt;init&gt;(Unknown Source)	at com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)	at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreReferrals(Unknown Source)	... 20 moreCaused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.	at sun.security.ssl.Alerts.getSSLException(Unknown Source)	at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)	at sun.security.ssl.Handshaker.fatalSE(Unknown Source)	at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)	at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)	at sun.security.ssl.Handshaker.processLoop(Unknown Source)	at sun.security.ssl.Handshaker.process_record(Unknown Source)	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)	at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)	at com.sun.jndi.ldap.Connection.createSocket(Unknown Source)	at com.sun.jndi.ldap.Connection.&lt;init&gt;(Unknown Source)	at com.sun.jndi.ldap.LdapClient.&lt;init&gt;(Unknown Source)	at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source)	at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)	at com.sun.jndi.ldap.LdapCtx.&lt;init&gt;(Unknown Source)	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)	at com.sun.jndi.url.ldap.ldapURLContextFactory.getObjectInstance(Unknown Source)	at javax.naming.spi.NamingManager.getURLObject(Unknown Source)	at javax.naming.spi.NamingManager.processURL(Unknown Source)	at javax.naming.spi.NamingManager.processURLAddrs(Unknown Source)	at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)	... 23 moreCaused by: java.security.cert.CertificateException: No subject alternative DNS name matching d-velop.de found.	at sun.security.util.HostnameChecker.matchDNS(Unknown Source)	at sun.security.util.HostnameChecker.match(Unknown Source)	at sun.security.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)	... 44 more
```


Answers:
author: Fabio Racobaldo _Herzum_
body: Hello Bastian,

it seems that there's a communication exception due to SSL. This link could be useful to fix your issue [](https://confluence.atlassian.com/x/eoLyGg)<https://confluence.atlassian.com/x/eoLyGg>

Hope this helps,

Fabio


author: Bastian Kippelt
body: Thanks, Fabio.

1. Disable "Follow Referrals" in the User Directory configuration, if cross-domain memberships are not used.

This works for me! :)


Tags: active-directory

error

ldap