3.6. Starting the Server

Once Geronimo has been installed, it must be started from the command line. Open a console window or shell prompt, change to the Geronimo installation directory, and run a command like this to start the server:

java -jar bin/server.jar

You should see output like this:

Booting Geronimo Kernel (in Java 1.4.2_07)...
Starting Geronimo Application Server
[*******] 100%   9s Startup complete                                   
  Listening on Ports:
    1099 0.0.0.0   RMI Naming
    1527 127.0.0.1 Derby Connector
    4201 127.0.0.1 OpenEJB Connector EJB
    8080 0.0.0.0   Jetty Connector HTTP
    8443 0.0.0.0   Jetty Connector HTTPS
   61616 0.0.0.0   ActiveMQ Message Broker Connector
Geronimo Application Server started (version 1.0-M4)

During the startup, the first thing that happens is that the "Kernel" has started, which is reponsible for loading and managing all the other components of the server. After that, several configuration modules are loaded and started (the names appear on the progress line during the startup, but are replaced by the "Startup complete" message at the end). The default Geronimo installation currently starts 5 configurations (and includes several more that are available but not started). As suggested by the port list, the default services include:

In addition, a number of other services are started that do not require additional network ports, including:

[Tip]Tip

It is not actually necessary to start Geronimo from any particular directory. So long as you pass the correct server.jar location on the java command line, you can run the start command from any directory on the file system.

3.6.1. Startup Options

When starting Geronimo, there are several options you may pass on the command line:

-quiet

Suppresses the progress bar display during startup. This is typically used when redirecting the console output to a file, since the progress bar updates look somewhat bizarre when viewed by, for example, a text editor.

-v

Normally, Geronimo displays WARN and higher log output on the console, though all log output is saved to the server log file. This option reduces the threshold for console output to INFO, meaning you'll see somewhat more output during the startup process. It also disables the startup progress bar (since at this output level, it would typically be mangled by log output that occurs during the startup sequence).

-vv

Similar to -v, except the console log threshold is set to DEBUG.

Additionally, it's possible to pass specific configuration names on the command line, such that Geronimo only starts with the listed configurations enabled. However, this is quite risky as if certain required configurations aren't listed, the server may not start properly or it may not be possible to deploy applications to the server. It's best to avoid this except in extreme circumstances.

3.6.2. Troubleshooting Startup Problems

Most server startup problems result in one or more stack traces. They also include a line like this:

16:26:01,753 ERROR [GBeanInstanceState] Error while starting;
   GBean is now in the FAILED state: objectName="geronimo.server:
   J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,
   J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector"

The "GBean is now in the FAILED state" message means that one of the services failed to start. The problem that caused this is usually in the stack trace after that. The most common problem is:

java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
        ...

This message means that one of the network ports that Geronimo is attempting to use is already in use. This often happens for port 8080, or possibly port 1099. If you can't shut down the product listening on the port in question, the best workaround is to reinstall Geronimo using the custom install process and pick different network ports for Geronimo on the main configuration screen. See Section 5.1, “Network Configuration” for a more detailed discussion of the network ports used by Geronimo.