If any of the configurations fail to start during server startup, the server will automatically be shutdown. Most errors during startup are logged to the command window, as well as to the geronimo.log
file under the <GERONIMO_HOME>/var/log
directory ( <GERONIMO_HOME>/<INSTANCE_NAME>/var/log
directory in the case of a non-default instance). Here are some common startup errors and ways to resolve these errors.
A BindException
is thrown when a GBean attempts to bind to a port that is already in use by another process on the system. A typical log entry for this kind of error is shown below:
2009-07-14 00:02:14,642 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.framework/rmi-naming/2.1.4/car? ServiceModule=org.apache.geronimo.framework/rmi-naming/2.1.4/car, j2eeType=GBean,name=RMIRegistry" java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use: JVM_Bind at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249) ...
Some of the reasons due to which this error may occur, and the associated remedies are:
The server instance is already running in a different server process. There is nothing to do in this case.
You are attempting to start a different server instance created using the multiple instances feature provided by Geronimo, and the
org.apache.geronimo.server.name
system property is not set. Make sure that you set theorg.apache.geronimo.server.name
system property correctly, by using theGERONIMO_OPTS
environment variable.You are attempting to start a different server instance created using the multiple instances feature provided by Geronimo, and the
org.apache.geronimo.server.name
system property is set correctly. ThePortOffset
property in theconfig-substitutions.properties
file under<GERONIMO_HOME>/<INSTANCE_NAME>/var/config
may not have been set correctly. Set thePortOffset
property so that the conflict is resolved. Remember that this property is used to offset the server ports when using multiple instances within the same installation.
An IllegalArgumentException
is thrown when you attempt to start a non-existent server instance. A message similar to the following is logged to the console:
11:49:26,439 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.framework/j2ee-system/2.1.4/car? ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.4/car, j2eeType=GBean,name=ServerInfo" java.lang.IllegalArgumentException: Server directory is not a directory: C:\book\temp\geronimo-tomcat6-javaee5-2.1.4\wrong_inst at org.apache.geronimo.system.serverinfo.BasicServerInfo.deriveBaseServer(BasicServerInfo.java:187) ...
To resolve this problem, specify the correct instance name in the org.apache.geronimo.server.name
system property.
An InvalidConfigurationException
is thrown when a configuration that the server is attempting to start does not exist. One reason due to which this can happen is with the multiple server instances feature, when a configuration deployed through one server instance is undeployed through a different server instance, which results in entries corresponding to that configuration being left out of the config.xml
files. A typical error message logged in this case looks like the following:
org.apache.geronimo.kernel.config.InvalidConfigException: Could not locate configs to start: [packt-samples/helloworld/1.0/war] at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:167)
To resolve this problem, edit the config.xml
file and remove the problematic configuration entries.