'Sorry, an error occurred trying to log you in - please try again' Message when Trying to Login in JIRA
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
With JIRA, an error appears:
"Sorry, an error occurred trying to log you in - please try again." when trying to log in JIRA with an LDAP user.
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
2011-03-16 14:59:06,599 QuartzWorker-0 INFO ServiceRunner [atlassian.crowd.directory.DbCachingRemoteDirectory] synchronisation complete in [26ms]
2011-03-16 14:59:06,648 QuartzWorker-0 ERROR ServiceRunner [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [10000].
com.atlassian.crowd.exception.OperationFailedException: java.util.concurrent.ExecutionException: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]]
at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllUsers(UsnChangedCacheRefresher.java:255)
...
Caused by: java.util.concurrent.ExecutionException: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
... 10 more
Caused by: com.atlassian.crowd.exception.OperationFailedException: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]]
at com.atlassian.crowd.directory.SpringLDAPConnector.pageSearchResults(SpringLDAPConnector.java:352)
...
Caused by: org.springframework.ldap.PartialResultException: nested exception is javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:203)
at org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:315)
...
Caused by: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]]
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:224)
... 13 more
Caused by: javax.naming.CommunicationException: mycompany.com:389 [Root exception is java.net.UnknownHostException: mycompany.com]
at com.sun.jndi.ldap.LdapReferralContext.<init>(LdapReferralContext.java:74)
at com.sun.jndi.ldap.LdapReferralException.getReferralContext(LdapReferralException.java:132)
... 15 more
Caused by: java.net.UnknownHostException: mycompany.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
Cause
This happens when the BaseDN of the directory does not contain an Organizational Unit (OU). For example: BaseDN:dc=mycompany,dc=com
Resolution
Add an Organizational Unit (OU) to the BaseDN. For example: ou=office,dc=mycompany,dc=com
ℹ️Please see our Troubleshooting LDAP User Management documentation for further assistance with diagnosing LDAP problems.
Was this helpful?