JIRA Users Unable to log in due to ServiceUnavailableException
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 attempting to log in as a LDAP user authenticating is failing and the user is unable to log in.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2012-10-21 06:42:37,516 http-60516-12 ERROR anonymous 401x1985x1 11jhfy2 172.1.1.100 /rest/gadget/1.0/login [jira.security.login.JiraSeraphAuthenticator] Error occurred while trying to authenticate user 'spidey'.
com.atlassian.crowd.exception.runtime.OperationFailedException
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.convertOperationFailedException(CrowdServiceImpl.java:869)
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:79)
...
Caused by: org.springframework.ldap.ServiceUnavailableException: 192.168.1.123:389; socket closed; nested exception is javax.naming.ServiceUnavailableException: 192.168.1.123:389; socket closed; remaining name 'cn=Team Mates,dc=The Avengers,dc=Marvel,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)
...
Caused by: javax.naming.ServiceUnavailableException: 192.168.1.123:389; socket closed; remaining name 'cn=Team Mates,dc=The Avengers,dc=Marvel,dc=com'
at com.sun.jndi.ldap.Connection.readReply(Connection.java:437)
at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:611)
at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:534)
at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1965)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1827)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1752)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:257)
at sun.reflect.GeneratedMethodAccessor651.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.ldap.transaction.compensating.manager.TransactionAwareDirContextInvocationHandler.invoke(TransactionAwareDirContextInvocationHandler.java:92)
at $Proxy1578.search(Unknown Source)
at org.springframework.ldap.core.LdapTemplate$3.executeSearch(LdapTemplate.java:231)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:293)
... 110 more
Enviroment
Jira Data Center on any version
Cause
When logging into JIRA with a user in a User Directory configured to integrate with a LDAP server (in this case, spidey is attempting to log into the Avengers Active Directory), JIRA will need to bind to the LDAP engine each time to authenticate that user. If the LDAP engine isn't available (online and connectable from the JIRA server), users will be unable to authenticate and log in.
Resolution
Confirm that the LDAP engine is working and available.
Check that the JIRA server can connect to the LDAP engine over the network. We have further information on this in our Testing the LDAP/AD Server Connectivity documentation.
ℹ️ Please see our Troubleshooting LDAP User Management documentation for further assistance with diagnosing LDAP problems.
Was this helpful?