LDAP没有连接到WebLogic。

huangapple go评论105阅读模式
英文:

LDAP is not connecting weblogic

问题

我在与LDAP服务器进行身份验证时遇到问题。应用程序代码(.ear)已部署在WebLogic服务器中。在WebLogic服务器中,代码无法与LDAP连接,而相同的代码设置在Tomcat服务器中运行时没有任何问题。
注意:有时只有第一次与WebLogic服务器进行身份验证时才会出现问题。
Java版本:java版本"1.7.0_80",WebLogic服务器:10.3.6.0
密钥库运行良好,我已经用简单的Java程序进行了测试。

System.setProperty("java.naming.ldap.factory.socket", "javax.net.ssl.SSLSocketFactory");
System.setProperty("javax.net.ssl.trustStore","TheKeyStore.keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
JSSESocketFactory jsseFactory = new JSSESocketFactory(null);
ld = new LDAPConnection(jsseFactory);
ld.connect(host,port);

这是我在连接WebLogic中的LDAP时遇到的异常。

netscape.ldap.LDAPException: JSSESocketFactory.makeSocket XXXXXXXXXXXXXXXXXXXXXXXXXXXX:636,远程主机在握手期间关闭连接(91); 无法连接到LDAP服务器
at netscape.ldap.factory.JSSESocketFactory.makeSocket(未知来源)
at netscape.ldap.LDAPConnSetupMgr.connectServer(未知来源)
at netscape.ldap.LDAPConnSetupMgr.openSerial(未知来源)
at netscape.ldap.LDAPConnSetupMgr.connect(未知来源)
at netscape.ldap.LDAPConnSetupMgr.access$000(未知来源)
at netscape.ldap.LDAPConnSetupMgr$1.run(未知来源)
at java.lang.Thread.run(Thread.java:662)

我已经检查了TLS协议,但它无法正常工作。
请为这个问题提供建议。

英文:

I am facing issue while authentication with LDAP server. Application code(.ear) is deployed in WebLogic Server.In WebLogic server, code is not connecting with LDAP, and the same code setting is working in the tomcat server without any issue.
Note: Sometimes only the first time it is authenticating with WebLogic server.
Java version :java version "1.7.0_80" and weblogic server : 10.3.6.0
Keystore is working perfectly and I have tested with simple java program.

System.setProperty("java.naming.ldap.factory.socket", "javax.net.ssl.SSLSocketFactory");
System.setProperty("javax.net.ssl.trustStore","TheKeyStore.keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
JSSESocketFactory jsseFactory = new JSSESocketFactory(null);
ld = new LDAPConnection(jsseFactory);
ld.connect(host,port);

Here is the exception i am getting while connecting ldap in weblogic.

netscape.ldap.LDAPException: JSSESocketFactory.makeSocket XXXXXXXXXXXXXXXXXXXXXXXXXXXX:636, Remote host closed connection during handshake (91); Cannot connect to the LDAP server
at netscape.ldap.factory.JSSESocketFactory.makeSocket(Unknown Source)
at netscape.ldap.LDAPConnSetupMgr.connectServer(Unknown Source)
at netscape.ldap.LDAPConnSetupMgr.openSerial(Unknown Source)
at netscape.ldap.LDAPConnSetupMgr.connect(Unknown Source)
at netscape.ldap.LDAPConnSetupMgr.access$000(Unknown Source)
at netscape.ldap.LDAPConnSetupMgr$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)

I have checked TLS protocol and it is not working.
Please advice for this issue

答案1

得分: 0

根据此问题,Java 7 默认使用 TLS 1.0,如果该协议未被接受,可能会导致您提到的错误。

英文:

As per this question, Java 7 defaults to TLS 1.0, which can cause the error you mention if that protocol is not accepted.

huangapple
  • 本文由 发表于 2020年8月19日 14:58:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/63481565.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定