启动glassfish服务器时的rmiexception

时间:2014-01-25 05:25:09

标签: glassfish rmi

我有glassfish服务器,我正在尝试从netbeans运行服务器。我收到以下错误:

WARNING:   Cannot start JMX connector JmxConnector config: { name = system, Protocol = rmi_jrmp, Address = 0.0.0.0, Port = 8686, AcceptAll = false, AuthRealmName = admin-realm, SecurityEnabled = false} due to exception java.io.IOException: Cannot bind to URL [rmi://MAZUMDAM4.americas.hpqcorp.net:8686/jmxrmi]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: MAZUMDAM4.americas.hpqcorp.net; nested exception is: 
    java.net.ConnectException: Connection timed out: connect]
SEVERE:   java.io.IOException: Cannot bind to URL [rmi://MAZUMDAM4.americas.hpqcorp.net:8686/jmxrmi]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: MAZUMDAM4.americas.hpqcorp.net; nested exception is: 
    java.net.ConnectException: Connection timed out: connect]
    at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)
    at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
    at org.glassfish.admin.mbeanserver.RMIConnectorStarter.start(RMIConnectorStarter.java:300)
    at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.startConnector(JMXStartupService.java:297)
    at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.run(JMXStartupService.java:333)
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: MAZUMDAM4.americas.hpqcorp.net; nested exception is: 
    java.net.ConnectException: Connection timed out: connect]
    at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:159)
    at com.sun.jndi.toolkit.url.GenericURLContext.rebind(GenericURLContext.java:249)
    at javax.naming.InitialContext.rebind(InitialContext.java:427)
    at javax.naming.InitialContext.rebind(InitialContext.java:427)
    at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:641)
    at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:426)
    ... 3 more
Caused by: java.rmi.ConnectException: Connection refused to host: MAZUMDAM4.americas.hpqcorp.net; nested exception is: 
    java.net.ConnectException: Connection timed out: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:157)
    ... 8 more
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    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 sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
    ... 13 more

现在搜索谷歌后,我发现了各种建议。

一个。检查防火墙。防火墙不是问题。因为这在两天前工作正常,它突然停止了。

湾从管理控制台设置JMX端口。我做了它并且没有用。

℃。检查端口是否已使用。我检查了一下。而且,我重新启动了glassfish服务器。甚至重新启动了电脑。什么都没有改变。

现在我需要一些聪明人的帮助来解决这个问题。

由于

2 个答案:

答案 0 :(得分:8)

启动域,进入管理控制台。

在管理控制台中,导航 配置&gt; server-config&gt; AdminService

主窗口中有一个标题为&#34;编辑JMX连接器&#34;

IP地址可能设置为&#34; 0.0.0.0&#34; (所有IP&#39;)

将其更改为&#34; 127.0.0.1&#34;

你可能还需要在主机文件中添加一个条目 对于errror中的域名 &#34; mymachine.SOMEDomain.net&#34;或者其他..以便它解析为127.0.0.1。

答案 1 :(得分:1)

潜在的问题是

Caused by: java.rmi.ConnectException: Connection refused to host: MAZUMDAM4.americas.hpqcorp.net; nested exception is: 
    java.net.ConnectException: Connection timed out: connect

在rebind()期间。查看堆栈跟踪。尝试将远程对象绑定到其注册表时,RMI在该主机上完全没有响应。这是网络拓扑问题或可能是DNS问题。它应该只是尝试绑定到'localhost'的注册表。