users@glassfish.java.net

cannot start glassfish v2 - JMX / RMI issue

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Dec 2008 04:36:18 PST

There is a glassfish v2 instance failing to start up in the production server.
The server.log reports the following problem:

[#|2008-12-08T09:38:06.496-0200|SEVERE|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=0a61fab5-7916-4022-abad-577c49a0787a;|CORE5071: An error occured during initialization
com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://webserver:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: webserver; nested exception is:
        java.net.ConnectException: Connection timed out]
        at com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onStartup(JmxConnectorLifecycle.java:153)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:442)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:120)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:411)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.io.IOException: Cannot bind to URL [rmi://webserver:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: webserver; nested exception is:
        java.net.ConnectException: Connection timed out]
        at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:814)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
        at com.sun.enterprise.admin.jmx.remote.server.rmi.JmxConnectorServerDriver.startConnectorServer(JmxConnectorServerDriver.java:218)
        at com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onStartup(JmxConnectorLifecycle.java:134)
        ... 9 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: webserver; nested exception is:
        java.net.ConnectException: Connection timed out]
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:122)
        at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
        at javax.naming.InitialContext.bind(InitialContext.java:359)
        at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:635)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
        ... 11 more
Caused by: java.rmi.ConnectException: Connection refused to host: webserver; nested exception is:
        java.net.ConnectException: Connection timed out
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:116)
        ... 15 more
Caused by: java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:520)
        at java.net.Socket.connect(Socket.java:470)
        at java.net.Socket.<init>(Socket.java:367)
        at java.net.Socket.<init>(Socket.java:180)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
        ... 20 more
|#]

It's happening on a Debian server with Java 1.5.0.14 64 bits.
We've checked the etc/hosts and 'webserver' is properly configured.
What could be causing this problem ?
[Message sent by forum member 'rbellia' (rbellia)]

http://forums.java.net/jive/thread.jspa?messageID=320979