Synchronization with LDAP Server Fails with PartialResultException in Bitbucket Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When Bitbucket Server connects to LDAP to refresh the cache for a user directory, the following appears in the atlassian-bitbucket.log
:
Stack trace #1
2013-03-08 00:44:53,540 ERROR [scheduler_Worker-1] c.a.c.d.DbCachingDirectoryPoller Error occurred while refreshing the cache for directory [ 32770 ].
com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.ServiceUnavailableException: somedomain.net:389; socket closed [Root exception is com.sun.jndi.ldap.LdapReferralException: Continuation Reference; remaining name 'dc=atlassian,dc=com']; remaining name '']
OR
Stack trace #2
2014-01-02 10:20:38,339 WARN [http-bio-7990-exec-10] 620x19548x1 192.168.22.194 "GET /scm/mo/mobile.git/info/refs HTTP/1.1" c.a.s.i.s.s.PluginAuthenticationProvider Could not authenticate rfisk; authentication by com.atlassian.bitbucket.bitbucket-authentication:crowdHttpAuthHandler failed
com.atlassian.bitbucket.user.AuthenticationSystemException: The remote authentication server is not available. Please try again later.
...
Caused by: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: somedomain.net:389 [Root exception is java.net.SocketTimeoutException: connect timed out]]
...
Caused by: javax.naming.CommunicationException: somedomain.net:389
...
Caused by: java.net.SocketTimeoutException: connect timed out
...
Diagnosis
N/A
Cause
Cause for Stack trace #1
The LDAP search received a follow-referral to another domain controller at 'somedomain.net', but this host is unreachable due to some DNS configuration issue.
Cause for Stack trace #2
Check your hosts file to see if this host has been entered there.
Solution
Workaround
Stack trace #1
If the LDAP server is load balanced, connect directly to one of the servers and bypass the load balancer.
Resolution
Stack trace #1
Disable the follow-referral property in Bitbucket Server, if not required.
Stack trace #2
Check the hosts file and enter the above host to it.
Was this helpful?