LDAP-错误打开连接:xx.xx.xx.xx:389

时间:2017-11-15 12:19:28

标签: ldap openldap

我正在尝试连接云上可用的LDAP服务器。服务器的Web界面是: xx.xx.xx.xx / phpldapadmin 我可以登录并执行我想要执行的任何操作。

但是当我试图通过JXplorer从本地机器绑定ldap时,我收到连接超时错误。以下是截图:

  1. 连接向导
  2. enter image description here

    1. 错误向导:
    2. enter image description here

      1. 堆栈跟踪

        javax.naming.CommunicationException: XX.XX.XX.XX:389 [Root exception is java.net.ConnectException: Connection timed out: connect] at com.sun.jndi.ldap.Connection.<init>(Connection.java:223) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:136) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1600) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2698) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) at javax.naming.InitialContext.init(InitialContext.java:242) at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:153) at com.ca.commons.jndi.JNDIOps.openContext(JNDIOps.java:529) at com.ca.commons.jndi.JNDIOps.<init>(JNDIOps.java:123) at com.ca.commons.jndi.BasicOps.<init>(BasicOps.java:55) at com.ca.commons.jndi.AdvancedOps.<init>(AdvancedOps.java:59) at com.ca.commons.naming.DXOps.<init>(DXOps.java:41) at com.ca.directory.jxplorer.broker.CBGraphicsOps.<init>(CBGraphicsOps.java:46) at com.ca.directory.jxplorer.broker.JNDIDataBroker.openConnection(JNDIDataBroker.java:477) at com.ca.directory.jxplorer.broker.JNDIDataBroker.openConnection(JNDIDataBroker.java:422) at com.ca.directory.jxplorer.broker.JNDIDataBroker.processRequest(JNDIDataBroker.java:396) at com.ca.directory.jxplorer.broker.DataBroker.processQueue(DataBroker.java:200) at com.ca.directory.jxplorer.broker.JNDIDataBroker.processQueue(JNDIDataBroker.java:913) at com.ca.directory.jxplorer.broker.DataBroker.run(DataBroker.java:165) at java.lang.Thread.run(Thread.java:722) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) at java.net.Socket.<init>(Socket.java:425) at java.net.Socket.<init>(Socket.java:208) at com.sun.jndi.ldap.Connection.createSocket(Connection.java:365) at com.sun.jndi.ldap.Connection.<init>(Connection.java:200) ... 25 more

      2. 请帮忙!

1 个答案:

答案 0 :(得分:2)

连接超时表示无法从网络访问端口389。确保云中的防火墙允许您的IP访问LDAP主机的端口389。 phpldapadmin将工作,因为它将侦听端口80/443,然后它本地连接LDAP。

您可以通过运行telnet <LDAP Host> 389来测试连接性。如果您的主机可以访问该端口,您将能够建立连接。