Skip to content

Command Line

spmallette edited this page Jul 3, 2012 · 16 revisions

Rexster is started and stopped through a command line interface exposed via the rexster.sh. When Rexster is started, it listens on a configurable port (port 8183 by default) for shutdown and status requests.

Starting Rexster

When starting Rexster from the command line using:

./bin/rexster.sh --start

or with:

./bin/rexster.sh -s

there are several options available:

  • -rp, --rexsterport – Overrides the rexster-server-port configuration value in rexster.xml. This value is 8182 by default.
  • -wr, --webroot – Overrides the web-root configuration value in rexster.xml.
  • -c, --configuration – Specify the location of a specific rexster.xml file to use for configuration. If this argument is not specified, Rexster will first try to read a file called rexster.xml from the root of the working directory. If it can’t find that it will use the com.tinkerpop.rexster.rexster.xml resource.
  • -d, --debug – When this flag is included on the command line, log messages from Jersey are no longer suppressed. May be useful when developing Rexster itself or building Extensions.
  • -h, --help – When this flag is supplied on the command line, Rexster outputs a description of the command line options available. Rexster will not start when help is requested.

The following command will start Rexster on port 7788 with a configuration file called my-rexster.xml:

./bin/rexster.sh --start -rp 7788 -c my-rexster.xml

Stopping Rexster

When stopping Rexster from the command line using:

./bin/rexster.sh --stop

or with the shorthand:

./bin/rexster.sh -x

there are several options available:

  • -rh, --rexsterhost – The host/IP address to which the shutdown command will be issued. Shutdown will assume 127.0.0.1 if the parameter is not specified.
  • -rp, --rexsterport – The port of the host to which the shutdown command will be issued. Shutdown will assume 8183 if the parameter is not specified.
  • -w, --wait – Wait for the server to confirm that shutdown was performed.
  • -h, --help – When this flag is supplied on the command line, a description of the command line options is displayed. A command to stop Rexster will not be issued when help is requested.

The following command would issue a stop message to a Rexster server listening on 192.168.0.123 and port 7788.

./bin/rexster.sh --stop -rh 192.168.0.123 -rp 7788

Other Commands

Aside from starting and stopping Rexster, there are several other commands that can be executed against Rexster.

  • -u, --status – Gets the status of the Rexster server (running or not). Use -h with it for a list of command parameters.
  • -v, --version – Shows the version of Rexster.
  • -h, --help – When this flag is supplied on the command line, a description of the command options is displayed.
Clone this wiki locally