我有一个java应用程序,我在其中使用LDAP身份验证。我正在尝试使用com.novell.ldap连接到java中的LDAP服务器。*。以下是代码
import com.novell.ldap.LDAPConnection;
LDAPConnection userConn = new LDAPConnection();
userConn.connect(host, port);
userConn.bind(3, userdn, password.getBytes("UTF8"));
理想情况下,此代码应该能够将用户与ldap服务器绑定,而不是在第4行userConn.bind上重置连接
LDAPException: Connection lost waiting for results from cdcgcorplb01.corp.twcable.com:636 (91) Connect Error
java.net.SocketException: Connection reset
at com.novell.ldap.Connection$ReaderThread.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:223)
at com.novell.ldap.asn1.ASN1Identifier.<init>(Unknown Source)
我可以通过哪些建议来解决这个问题。