Scorpion's Corner
Glassfish Startup problem -- /etc/hosts entry
I had an opensolaris environment on which I was running GlassfishESB. Since I had to connect to a local Network I had to make some changes to the /etc/hosts file and add an entry to the same.
After that I tried to restart Glassfish it did not restart. It failed at the following point
ADM1079: Initialization of AMX MBeans started
It gave the following exception in server.log. I had to modify the hosts file to make the server start again.
[#|2009-04-08T15:57:28.501+0530|SEVERE|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12;com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out];_RequestID=c39a90fc-8790-4b27-aa91-730bf7b8ba85;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12 cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection timed out]|#]
Posted at 08:50PM Apr 08, 2009 by Narayana Rallabandi in Sun | Comments[3]







Thanks Narayana for the feedback!
Can you follow up on users@glassfish.dev.java.net ? It'll be useful to mention what changes were made to /etc/hosts.
-Arun
Posted by Arun Gupta on April 08, 2009 at 09:55 PM IST #
Hi Narayana,
Assuming the hostnames are correct, doublecheck for any firewall issues that may be blocking you. Try pinging each machine or telneting to the ports you need.
Paul
Posted by Paul Randall on April 08, 2009 at 10:13 PM IST #
I had to roll back the /etc/hosts file to the original state. What I mean here is bringing it back to the state where it was while I was installing Glassfish. I thought that this might help somebody who might run into similar kind of issues.
Henceforth I will follow up such issues on users@glassfish.dev.java.net also.
I did check for the hostnames and also for the firewalls. The only thing that changed was restarting Glassfish from another network.
I guess that the JMX connector had some stickiness. I did observe the same in case of the Java CAPS repository too where in it also had the same MBean Issue. I had to resort to similar things with the network env. There I was having issue with /etc/hosts file being erased while installing punchin (http://blogs.sun.com/narayanaa/entry/java_caps_tip_on_open)
Posted by Narayana Rallabandi on April 09, 2009 at 06:50 AM IST #