Jira server fails to connect to LDAP server with UnknownHostException (Server and Data Center)

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

JIRA is unable to connect to the LDAP server.

The following appears in the atlassian-jira.log:

Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not create DirContext instance for transaction; nested exception is org.springframework.ldap.CommunicationException: ldap.atlassian.com; nested exception is javax.naming.CommunicationException: ldap.atlassian.com [Root exception is java.net.UnknownHostException: ldap.atlassian.com]

Cause

JIRA cannot resolve the connection to the LDAP server. This is commonly caused by an incorrectly configured DNS or hostname.

Resolution

  1. Update the DNS records to include the appropriate server name & IP used in the LDAP configuration.
  2. If updating of the DNS server used is not possible, this can be achieved by manually adding the following entry, replacing the IP & server name as appropriate to the below file on the server hosting JIRA. 
    Linux: /etc/hosts
    Windows: C:\Windows\System32\drivers\etc\hosts

    <IP of server>    <host name of server>
    192.168.1.123     ldap.atlassian.com
    

    You need to have local administrator rights on the machine hosting JIRA to make these changes.

  3. Alternatively, you can use the IP of the server in the LDAP configuration, as in Connecting to an LDAP Directory.

(info) We also have some additional steps for LDAP troubleshooting, please review these if you're still experiencing problems.

Last modified on Nov 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.