使用 Apache Directory Studio

发布于 2024-12-27 21:54:30 字数 3457 浏览 0 评论 0原文

我已关注 http://confluence.atlassian .com/display/CROWD/Creating+a+Connection+to+your+LDAP+Directory
用于基本了解并尝试设置 LDAP 供我的办公室使用。

场景:
我已经在 localhost:389 启动了 Apache 2.2(Apache 目录服务器),并且运行良好。

接下来,我安装了 Apache Directory Studio 并尝试创建新连接。但我在打开连接时收到以下错误:

Error while opening connection - localhost:389; socket closed  
  javax.naming.ServiceUnavailableException: localhost:389; socket closed  
    at com.sun.jndi.ldap.Connection.readReply(Unknown Source)  
    at com.sun.jndi.ldap.LdapClient.ldapBind(Unknown Source)  
    at com.sun.jndi.ldap.LdapClient.authenticate(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.reconnect(Unknown Source)  
    at javax.naming.ldap.InitialLdapContext.reconnect(Unknown Source)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)  
    at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)  
    at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)  
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  

请指导我!
我通过更改端口号解决了这个问题。 现在我收到以下错误:

Error while opening connection - [LDAP: error code 49 - cannot bind the principalDn.]  
  javax.naming.AuthenticationException: [LDAP: error code 49 - cannot bind the principalDn.]  
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)    
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)    
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.reconnect(Unknown Source)  
    at javax.naming.ldap.InitialLdapContext.reconnect(Unknown Source)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)  
    at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)  
    at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)  
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  

I have followed http://confluence.atlassian.com/display/CROWD/Creating+a+Connection+to+your+LDAP+Directory
for basic understanding and trying to set up LDAP for my office use.

scenario:
I have started Apache 2.2 (Apache Directory Server) at localhost:389 and it's running fine.

Next, I installed Apache DirectoryStudio and trying to create new connection. But I am getting the following error while opening the connection:

Error while opening connection - localhost:389; socket closed  
  javax.naming.ServiceUnavailableException: localhost:389; socket closed  
    at com.sun.jndi.ldap.Connection.readReply(Unknown Source)  
    at com.sun.jndi.ldap.LdapClient.ldapBind(Unknown Source)  
    at com.sun.jndi.ldap.LdapClient.authenticate(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.reconnect(Unknown Source)  
    at javax.naming.ldap.InitialLdapContext.reconnect(Unknown Source)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)  
    at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)  
    at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)  
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  

Please guide me!
I resolved this by changing theport numbers.
Now I am getting the following error:

Error while opening connection - [LDAP: error code 49 - cannot bind the principalDn.]  
  javax.naming.AuthenticationException: [LDAP: error code 49 - cannot bind the principalDn.]  
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)    
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)    
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.ensureOpen(Unknown Source)  
    at com.sun.jndi.ldap.LdapCtx.reconnect(Unknown Source)  
    at javax.naming.ldap.InitialLdapContext.reconnect(Unknown Source)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)  
    at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)  
    at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)  
    at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)  
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的年少不轻狂 2025-01-03 21:54:30

这意味着您与 ldap 服务器的连接是错误的。我知道 Apache DS 的默认用户名和密码分别是 admin 和 Secret。

尝试以下作为绑定 DN 或用户字符串:

uid=admin,ou=system

This means that your connection to the ldap server is wrong. I know the default username and password for Apache DS is admin and secret respectively.

Try the following as the bind DN or user string:

uid=admin,ou=system
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文