users@glassfish.java.net

Port error during startup

From: <glassfish_at_javadesktop.org>
Date: Sat, 03 Oct 2009 15:43:45 PDT

I get the following error when trying to start Glassfish 2.1:

[code]
java.net.ConnectException: Operation timed out];_RequestID=43d9fc74-34c2-43ae-a7b9-43827f4573a5;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle_at_734bcb5c cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://wesley-bakers-macbook-pro.local:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: wesley-bakers-macbook-pro.local; nested exception is:
        java.net.ConnectException: Operation timed out]
CORE5071: An error occured during initialization
com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://wesley-bakers-macbook-pro.local:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: wesley-bakers-macbook-pro.local; nested exception is:
        java.net.ConnectException: Operation timed out]
        at com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onStartup(JmxConnectorLifecycle.java:153)
        at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:446)
        at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:134)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:409)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:336)
        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:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
Caused by: java.io.IOException: Cannot bind to URL [rmi://wesley-bakers-macbook-pro.local:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: wesley-bakers-macbook-pro.local; nested exception is:
        java.net.ConnectException: Operation timed out]
        at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417)
        at com.sun.enterprise.admin.jmx.remote.server.rmi.JmxConnectorServerDriver.startConnectorServer(JmxConnectorServerDriver.java:240)
        at com.sun.enterprise.admin.server.core.JmxConnectorLifecycle.onStartup(JmxConnectorLifecycle.java:134)
        ... 9 more
[/code]

It appears that something is blocking or already using the 8686 port, but when I do a netstat -na | grep LISTEN, I get the following lines during startup (they do not appear before startup or after the error):

[code]
tcp46 0 0 *.52721 *.* LISTEN
tcp46 0 0 *.8686 *.* LISTEN
tcp46 0 0 *.3920 *.* LISTEN
tcp46 0 0 *.3820 *.* LISTEN
tcp46 0 0 *.3700 *.* LISTEN
[/code]

so why is Glassfish not able to connect to 8686, even though it is obviously open? I even tried to telnet to it during startup and it connected fine.
[Message sent by forum member 'malakh' (malakhshaket_at_gmail.com)]

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