I have a client application which is using JNDI to establish a connection to a LDAP Server. When I specify a non LDAP port, namely port 25, my client application is hanging. At that point, the client stack looks like:
- java.lang.Object.wait(long)
- com.sun.jndi.ldap.Connection.readReply line=418
- com.sun.jndi.ldap.LdapClient.ldapBind line=340
- com.sun.jndi.ldap.LdapClient.authenticate line=192
- com.sun.jndi.ldap.LdapCtx.connect line=2637
- com.sun.jndi.ldap.LdapCtx.ensureOpen line=2546
- com.sun.jndi.ldap.LdapCtx.ensureOpen line=2520
- com.sun.jndi.ldap.LdapCtx.reconnect line=2516
- javax.naming.ldap.InitialLdapContext.reconnect line=173
- com.sun.directory.common.LDAPConnectionCenter.getLdapConnection line=160
[...]
Port 25 is the well-known port for SMTP.