Connecting through secure LDAP from BitBucket Server to Azure AD Domain Services results in timeout

Brendan Slezak October 19, 2017

Connecting through secure LDAP from BitBucket Server to Azure AD Domain Services results in intermittent Timeout errors.

Here are the error messages that are in the atlassian-bitbucket.log:

org.springframework.ldap.ServiceUnavailableException: ldap.mydomain.com:636; socket closed; nested exception is javax.naming.ServiceUnavailableException: ldap.mydomain.com:636; socket closed; remaining name 'ou=AADDC Users,DC=mydomain,DC=com'

 

Reviewing the network capture we can see that the connection is established without problems between the Azure AD Domain Services secure LDAP and the BitBucket Server, but after some time the client server sends an Encrypted Alert which causes the Azure AD Domain Services to close the connection.  I think this may be a bug?

 

2 answers

0 votes
Anthony Suda April 5, 2019

We're having the same issue with Bitbucket 6.0.1. Support ticket (SPP-34928) has pointed to the issue with the Azure directory timing out but no one can seem to find an explanation.

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2017

Hi Brendan, we'd need to know if this is coming from Azure or Bitbucket; "the client server sends an Encrypted Alert" is ambiguous. Since the packets are encrypted, we can't be sure if it's an orderly shutdown or a termination due to an encryption problem, probably from the symmetric key exchange. If the packet is coming from Azure, we would need the Azure logs

There are two possibilities here:

  1. Azure is doing something strange with the network causing a handshake_failure or bad_record_mac due to some sort of network change. You could get this from the TCP Dump.
  2. The linux system has been updated recently introducing this bug.

Most of what seems to be happening here is below our app. It's either Java or the system making this negotiation, we haven't found any other reports of this to Atlassian.

Let us know!

Regards,

Ana

Nico du Plessis May 12, 2018

Hi

We're seeing something similar on Bamboo 6.5 at the moment. We're authentication to an Azure AD server. 

Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:60000ms.; remaining name 'OU=AADDC Users,DC=mydomain,DC=com'
at com.sun.jndi.ldap.Connection.readReply(Connection.java:490)
at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:638)
at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:561)
at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1985)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1844)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1769)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:392)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:358)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:341)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:267)
at com.atlassian.user.impl.ldap.adaptor.AbstractLDAPGroupAdaptor.search(AbstractLDAPGroupAdaptor.java:179)

 

I've tested the same query with ldapsearch from the server and it consistently executes without any issues 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events