连接apache directory studio的问题

Problem of connection apache directory studio

我已经安装了 apache directory studio,但是服务器打不开,我在创建新连接时遇到了这个错误。

Une erreur est survenue lors de l''ouverture de la connexion
 -  ERR_04110_CANNOT_CONNECT_TO_SERVER Cannot connect to the server: Connection refused: no further information
org.apache.directory.studio.connection.core.io.StudioLdapException:  ERR_04110_CANNOT_CONNECT_TO_SERVER Cannot connect to the server: Connection refused: no further information
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.toStudioLdapException(DirectoryApiConnectionWrapper.java:1350)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.access(DirectoryApiConnectionWrapper.java:1342)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.run(DirectoryApiConnectionWrapper.java:258)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1261)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.doConnect(DirectoryApiConnectionWrapper.java:280)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.connect(DirectoryApiConnectionWrapper.java:144)
    at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:111)
    at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.apache.directory.ldap.client.api.exception.InvalidConnectionException: ERR_04110_CANNOT_CONNECT_TO_SERVER Cannot connect to the server: Connection refused: no further information
    at org.apache.directory.ldap.client.api.LdapNetworkConnection.close(LdapNetworkConnection.java:781)
    at org.apache.directory.ldap.client.api.LdapNetworkConnection.connect(LdapNetworkConnection.java:978)
    at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.run(DirectoryApiConnectionWrapper.java:227)
    ... 6 more
Caused by: java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.Net.pollConnect(Native Method)
    at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:944)
    at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:223)
    at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:47)
    at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.processConnections(AbstractPollingIoConnector.java:571)
    at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.run(AbstractPollingIoConnector.java:456)
    

问题出在我安装 jdk 11 的 jvm 中,我打开 apache 目录 studio 的配置文件以添加 vm 和 jdk 文件夹的本地路径,然后添加此 \javaw.exe

-vm
E:\Repositories\Jdk11.0.12\bin\javaw.exe

我遇到了同样的问题。根据 Takwa 的回答,我已经解决了这个问题。 属性 文件路径为 {Apache Directory Studio Home}/ApacheDirectoryStudio.ini

在此文件中禁用 -vm 标记并添加 java.exe。 而且我还发现,并非所有 Java 11 JDK 之后的版本都可以使用。 就我而言,我首先尝试 JDK 17 会发生此错误。 在我编辑 属性 文件并设置 JDK 版本 11 后,此错误将不会发生。