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?