Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.3.207; nested exception is: java.net.ConnectException: Connection refused: connect]
时间: 2023-08-05 13:15:02 浏览: 120
这个错误可能是由于无法连接到远程主机导致的。请确保您的主机网络连接正常,并且您正在连接到正确的 IP 地址和端口。您还可以尝试使用 telnet 命令测试连接是否正常。例如,运行以下命令测试与 IP 地址为 192.168.3.207 的主机的连接:
```
telnet 192.168.3.207 1099
```
如果连接不成功,则表示无法连接到远程主机。您可以使用 ping 命令检查您的网络连接是否正常。
相关问题
application server was not connected before run configuration stop, reason: java.io.ioexception: failed to retrieve rmiserver stub: javax.naming.serviceunavailableexception [root exception is java.rmi.connectexception: connection refused to host: localhost; nested exception is: java.net.connectexception: connection refused: connect]
在运行配置停止之前,应用程序服务器没有连接,原因是:java.io.IOException:无法检索RMI服务器存根:javax.naming.ServiceUnavailableException [根本异常是java.rmi.ConnectException:连接到主机被拒绝:localhost;嵌套异常是:java.net.ConnectException:连接被拒绝:连接]。
使用jmx连接jvm报错,Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: non-JRMP server at remote endpoint]
这个错误通常是因为连接的JVM没有启用JMX远程连接。你需要在JVM参数中添加以下参数启用JMX远程连接:
```
-Dcom.sun.management.jmxremote.port=<port>
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
```
其中,`<port>`是JMX远程连接端口号。如果需要启用JMX远程连接的认证和SSL加密,请相应修改上述参数。
另外,如果你使用的是Java 9及以上版本,还需要添加以下参数:
```
--add-opens java.management/sun.management=ALL-UNNAMED
```
这是因为Java 9及以上版本中默认禁止JMX远程连接访问sun.management包。