Failed to start Glassfish Server

I was getting following error, while starting the GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs). And it failed to startup.

[#|2010-07-07T17:55:38.663-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=592002e1-2f4e-44e3-b7da-1cc5af8129da;|CORE5071: An error occured during initialization
com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://REMOTE_IP:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: REMOTE_IP; nested exception is:
java.net.ConnectException: Connection timed out]

[#|2010-07-07T18:32:18.697-0500|SEVERE|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;_RequestID=e14b9b96-f473-409a-b6cd-f46bee3574fb;|CORE5071: An error occured during initialization
com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://REMOTE_IP:8686/management/rmi-jmx-connector]: javax.naming.NoPermissionException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.AccessException: Registry.Registry.bind disallowed; origin /192.168.1.1 is non-local host]

After few hours of googling and trial and error. I found that you can disable the JMX Connector by disabling it in the domain.xml file located at /domains/domain1/config/domain.xml in your GlassFish install directory.

You need to set the enabled attritute to false, as shown below.


<jmx-connector accept-all="true" address="0.0.0.0" auth-realm-name="admin-realm" enabled=”false” name=”system” port=”8686″ protocol=”rmi_jrmp” security-enabled=”false”>

Obviously this is not a permanent solution. But it does start the server back up. If you know the solution to the issue please let me know in the comments.

Advertisements
This entry was posted in GlassFish. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s