Starting and stopping Geronimo via console

There are a few command line alternatives to start the server. From a command line window or terminal change directory to <geronimo_home>/bin and run startup or geronimo run or geronimo start command. Refer to the Startup and Geronimo from the Tools and commands section for all the options for these commands.

To stop the server you will have to open a new command line window or terminal, change directory to <geronimo_home>/bin and run the shutdown command. You will be prompted for username and password. Alternatively you can press Ctrl+C on the terminal that Geronimo is running to kill the process. Refer to the Shutdown and Geronimo from the Tools and commands section for the available options for these commands.

If the server is already running you have the option of using the Introducing Geronimo Administration Console to shutdown the server remotely. With the server up and running open a Web browser and point to the following URL to access the console:

http://localhost:8080/console

Log in to the Geronimo Administration Console and click on Server > Shutdown on the Console Navigation menu on the left.

When you click on the Shutdown button in the Server Manager portlet, you will be prompted one more time to confirm the server shutdown. Click OK to confirm and shutdown the server. The connection from the Administration Console will be lost and you will need to restart the server from a terminal or command line window.

Starting and Stopping Geronimo in Gshell

Geronimo can be started through GShell using the geronimo/start-server command.

jason@Jason-Warners-Computer.local:/> geronimo/start-server --background
Launching Geronimo Server...
Booting Geronimo Kernel (in Java 1.5.0_13)...

If the --background option is not used, then the server instance will maintain control of the terminal and a new instance of gshell must be started to interact with the server.

Other useful geronimo/start-server options (Use geronimo/start-server --help to see a full list of options).

start-server
 --

  -A (--javaagent) JAR           Use a specific Java Agent, set to 'none' to disable
  -D (--property) NAME=VALUE     Define system properties
  -G (--gproperty) NAME=VALUE    Define an org.apache.geronimo property
  -H (--home) DIR                Use a specific Geronimo home directory
  -J (--javaopt) FLAG            Set a JVM flag
  -b (--background)              Run the server process in the background
  -h (--help)                    Display this help message
  -j (--jvm) DIR                 Use a specific Java Virtual Machine for server
                                 process
  -l (--logfile) FILE            Capture console output to file
  -m (--module) NAME             Start up a specific module by name
  -q (--quiet)                   Suppress informative and warning messages
  -t (--timeout) N               Specify the timeout for the server process in s
                                 econds
  -v (--verbose)                 Enable verbose output; specify multipule times
                                 to increase verbosity

Geronimo can be stopped using the geronimo/stop-server command.

jason@Jason-Warners-Computer.local:/> geronimo/stop-server -u system -w manager
Stopping Geronimo server: localhost:1099
[] received stop signal

If username -u and password -w are not provided on the command line, the user will be prompted for them before the server shutdown process is started. The full set of geronimo/stop-server options can be seen in gshell using the --help option, the same way as for geronimo/start-server.

On a Windows platform

Use forward slash "/" instead of the traditional back slash "\" as directory separators within GShell commands.
For example:

jason@Local:/>geronimo/start-server -j 'c:/programme files/Java60/bin/java.exe'

This issue is addressed by (https://issues.apache.org/jira/browse/GERONIMO-4709)

  • No labels