Esh Esh - 2 months ago 16
Java Question

LDAP Access - javax.naming.CommunicationException: simple bind failed

We are running into issues connecting LDAP server after LDAP SHA-256 Migration .We got the below exception when we ran our application in debug mode :

javax.naming.CommunicationException: simple bind failed: xxxamd.xxx.com:636 [Root exception is java.net.SocketException: Socket is closed]​


We tried to add the below .cer files into our application specific cacerts file:


  1. GlobalSignRootCA.cer

  2. GlobalSignOrganizationValidationCA-G2.cer

  3. OrganizationValidationCA-SHA256-G2.cer



After adding the above .cer file in cacerts ,we are getting different exception :

getLdapContactInfo(): javax.naming.CommunicationException: simple bind failed: xxxamd.xxx.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Certificate signature validation failed]


Server :


Perl Web Farm Server


Java Version :

xxxxx@yyyy:~/www $ java -version

java version "1.4.2_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)


Any help or suggestion on this regard is greatly appreciated.

Note: SUN JRE has been implemented in Server level and our application is IBM JRE under the
/cgi-bin/
folder. We tried adding certificate(mentioned above) in "cacerts" under
/usr/lib/jvm/jre/lib/security/
but nothing worked.


Esh Esh
Answer

I sorted out why am getting the above exception. The above 3 .cer files are not compatible to Java 1.4.2. So i tried pointing my application to Java 1.6 and the issue got resolved. Am able to retrieve information from the LDAP server.

Thanks