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

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?

 

1 answer

0 vote

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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,165 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you