LDAP connection over SSL does not work with parameter "com.sun.jndi.ldap.connect.timeout"
I faced the problem that my application could not connect to the LDAP server over SSL (LDAPS: // ldapserver: 636). This would always throw an exception:
2014-08-07 12:52:13,486 ERROR : simple bind failed: ldapserver:636
javax.naming.CommunicationException: simple bind failed: ldapserver:636 [Root exception is javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake]
But after removing this line of code:
environments.put("com.sun.jndi.ldap.connect.timeout", "10000");
It works. Can anyone explain how the timeout property affects the LDAP SSL connection?
Thanks, Stoper
+3
source to share