Jira is facing LDAP issues due to the error "java.net.NoRouteToHostException in LDAP connection"
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
The Jira application is experiencing any of the symptom below:
- JIRA is not able to connect to LDAP, or
- Users are not able to login, or
- Not able to add user directory.
Environment
Jira Data Center
Diagnosis
The following error appears in the atlassian-jira.log
:
Caused by: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: ABC.PQR:389 [Root exception is java.net.NoRouteToHostException: No route to host]]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:205)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:315)
Cause
Jira is not able to connect to the LDAP server because it is not able to resolve the path that it can use to the LDAP/Active Directory server.
There can be several reasons for this :
- There might be a reverse proxy in place that is blocking the connection
- There might be a firewall in place between the servers that is blocking the port
- JIRA server not being able to resolve the hostname of the LDAP server correctly, etc
- There may be HTTP Access policies being pushed from ActiveDirectory, or puppet (preventing access to the LDAP Server)
- Overloaded domain controller, which caused JIRAs timeouts.
Having said this, this is a network issue instead of a JIRA issue.
Resolution
Try the following steps to identify the problem :
ping ABC.PQR
telnet ABC.PQR 389
- After the network issue is resolved, please login with a JIRA internal user
Delete the current LDAP connection
- Set up a new one with the same credentials
- Define a new, less loaded controller in configuration