Linux – JVM will not start when starting Glassfish on RHEL

glassfishjavalinux

GlassFish 3.0.1
RHEL 6.3

When trying to start GlassFish I get the following JVM error:

JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 0.
Before it died, it produced the following output:
Command start-domain failed.

I have plenty of free memory: 3689 MB

Best Answer

As stated in the error message, it's related to domains in glassfish.

  • No domains defined : glassfish won't start
  • Several domains : you need to set domain to use in startup script.