I'm trying to configure Tomcat to connect to an LDAP server on our network, and I'm getting the following error:
javax.naming.ServiceUnavailableException: xx.xx.xx.xx:636; socket closed at com.sun.jndi.ldap.Connection.readReply(Connection.java:419) at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340) at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:192) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694)
Here is the attempted Realm:
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionName="CN=username,CN=users,DC=domain-name,DC=com"
connectionPassword="password"
connectionURL="ldap://xx.xx.xx.xx:636"
userPattern="CN={0},CN=users,DC=domain-name,DC=com"
roleBase="DC=domain-name,DC=com"
roleName="CN"
roleSearch="CN={1}"
/>
I'm not sure why this is happening, as using Softerra LDAP Admin. works with the same login information (the same DN and password).
Edit: just figured out that JXplorer doesn't work and fails with the same error, but Softerra does not.