Server startup and shutdown
From ControlTier
The ControlTier server applications run inside a common Jetty instance. Unix installations use the jetty.sh command to manage startup and shutdown. See the Jetty Wiki for authoritative information on Jetty management.
Assumptions
- You have installed the ControlTier server and are on that host. See Installation.
- ControlTier environment variables have been set. See ControlTier Environment Variables.
Contents |
Startup
Unix Start
Within the Jetty install is a "jetty.sh" script used to manage the Jetty process. This should already be set in your PATH. (ie, PATH=$PATH:$JETTY_HOME/bin)
Use the "start" sub-command:
$ jetty.sh start Starting Jetty: STARTED Jetty Tue Dec 23 16:07:29 PST 2008 2008-12-23 16:07:30.659::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-12-23 16:07:30.726::INFO: Redirecting stderr/stdout to /Users/alexh/ctier/pkgs/jetty-6.1.10/logs/2008_12_24.stderrout.log
Windows Start
Within the Jetty install is a "start.bat" script used to start the Jetty process. You'll find it as %JETTY_HOME%\bin\start.bat.
start
The install also includes a Jetty-Service.exe documented here Win32Wrapper.
Troubleshooting
Already Running
You might see this error even if there is no JVM process:
$ jetty.sh start Starting Jetty: Already Running!!
Just run the "stop" command and then run the "start" command again.
Solaris:start-stop-daemon: command not found
Running "jetty.sh start" you might see this error on Solaris:
Starting Jetty: /export/home/alexh/ctier/pkgs/jetty-6.1.10/bin/jetty.sh: line 497: whoami: command not found /export/home/alexh/ctier/pkgs/jetty-6.1.10/bin/jetty.sh: line 499: start-stop-daemon: command not found
This is due to the Solaris "which" command. The hack work around is to make the following change in jetty.sh:
494c494 < if which start-stop-daemon > /dev/null 2>&1 --- > if false
Shutdown
Unix Stop
Within the Jetty install is a "jetty.sh" script used to manage the Jetty process. This should already be set in your PATH. (ie, PATH=$PATH:$JETTY_HOME/bin)
Use the "stop" sub-command:
$ jetty.sh stop Stopping: OK
Windows Stop
Apart from stopping Jetty with a cntrl-c in the same terminal window as you started it, you can
start Jetty so that it listens on a local port for stop commands:
java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar
The server can then be stopped using a different terminal window on the same machine:
java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --stop
If the STOP.KEY property is ommitted from the start command, then a random key is printed on standard out. If the STOP.PORT is set to 0, a random available port is assigned and printed on stdout.
If you are using the Windows Service Wrapper see: Jetty docs.
Check status
Unix Status
Within the Jetty install is a "jetty.sh" script used to manage the Jetty process. This should already be set in your PATH. (ie, PATH=$PATH:$JETTY_HOME/bin)
Use the "check" sub-command:
jetty.sh check
$ jetty.sh
Usage: /Users/alexh/ctier/pkgs/jetty-6.1.10/bin/jetty.sh {start|stop|run|restart|check|supervise} [ CONFIGS ... ]
strongbad:~/3-2-dev/controltier [499]
$ jetty.sh check
Checking arguments to Jetty:
JETTY_HOME = /Users/alexh/ctier/pkgs/jetty-6.1.10
JETTY_CONF =
JETTY_RUN = /Users/alexh/ctier/pkgs/jetty-6.1.10/logs
JETTY_PID = /Users/alexh/ctier/pkgs/jetty-6.1.10/logs/jetty.pid
JETTY_PORT =
JETTY_LOGS = /Users/alexh/ctier/pkgs/jetty-6.1.10/logs
CONFIGS = /Users/alexh/ctier/pkgs/jetty-6.1.10/etc/jetty-logging.xml /Users/alexh/ctier/pkgs/jetty-6.1.10/etc/jetty.xml
JAVA_OPTIONS = -XX:MaxPermSize=128m -Xmx1024m -Xms256m -Djobcenter.config.location=
/Users/alexh/ctier/jobcenter/jobcenter-config.properties -Dreportcenter.config.location=
/Users/alexh/ctier/reportcenter/reportcenter-config.properties -Djetty.logs=
/Users/alexh/ctier/pkgs/jetty-6.1.10/logs -Djetty.home=/Users/alexh/ctier/pkgs/jetty-6.1.10
-Djava.io.tmpdir=/Users/alexh/ctier/pkgs/jetty-6.1.10/work
JAVA = /usr/bin/java
CLASSPATH =
RUN_CMD = /usr/bin/java -XX:MaxPermSize=128m -Xmx1024m -Xms256m
-Djobcenter.config.location=/Users/alexh/ctier/jobcenter/jobcenter-config.properties
-Dreportcenter.config.location=/Users/alexh/ctier/reportcenter/reportcenter-config.properties
-Djetty.logs=/Users/alexh/ctier/pkgs/jetty-6.1.10/logs -Djetty.home=/
Users/alexh/ctier/pkgs/jetty-6.1.10 -Djava.io.tmpdir=
/Users/alexh/ctier/pkgs/jetty-6.1.10/work -jar /Users/alexh/ctier/pkgs/jetty-6.1.10/start.jar
/Users/alexh/ctier/pkgs/jetty-6.1.10/etc/jetty-logging.xml /Users/alexh/ctier/pkgs/jetty-6.1.10/etc/jetty.xml
Jetty running pid=7440
Windows Status
If you are using the Windows Service Wrapper see Win32Wrapper.
Browse landing page
Visit the ControlTier Server landing page URL shown by the install script (e.g. http://localhost:8080/). This page contains links to each of the ControlTier web applications running in the Jetty instance.
| ||||||||||||||


