ServiceUnavailableException Reported when Connecting to LDAP
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
Symptoms
When trying to connect to an LDAP Server, the following error appears in the log file:
1
2
3
4
5
ERROR [codehaus.xfire.handler.DefaultFaultHandler] Fault occurred!
org.springframework.ldap.ServiceUnavailableException: example.com:389; socket closed; nested exception is javax.naming.ServiceUnavailableException: example.com:389; socket closed; remaining name 'DC=sydney,DC=example,DC=com'
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:210)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:319)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
Cause
Unknown. Investigation is being tracked at CWD-1942 - Investigate AD Connectivity issues.
Resolution
As a workaround, add the following line to your JAVA_OPTS definition (To do this either edit or create a setenv.sh
or setenv.bat
file located in Tomcat's bin directory: apache-tomcat/bin/setenv.sh
or setenv.bat
):
1
-Dcom.sun.jndi.ldap.connect.pool.timeout=300000
If running Crowd as a Windows Service, please add the setting above to the Windows Registry key responsible for the Crowd Service:
1
HKEY_LOCAL_MACHINE -> SOFTWARE -> Apache Software Foundation -> Procrun 2.0 -> Crowd -> Parameters -> Java -> Options
Was this helpful?