Starting, Stopping and Monitoring
NOTE: This document is for information on starting an Apache Brooklyn Server. For information on using the Brooklyn Client CLI to access an already running Brooklyn Server, refer to Client CLI Reference.
Packages for RHEL/CentOS and Ubuntu
If you are using the
.deb package of Apache Brooklyn, then Brooklyn
will integrate with your OS service management. Commands such as
service brooklyn start will work as expected, and Brooklyn’s PID file will be
stored in the normal location for your OS, such as
The platform-independent distributions are packaged in
To launch Brooklyn, from the directory where Brooklyn is unpacked, run:
% bin/brooklyn launch > /dev/null 2>&1 & disown
With no configuration, this will launch the Brooklyn web console and REST API on
No password is set, but the server is listening only on the loopback network interface for security.
Once security is configured, Brooklyn will listen on all network interfaces by default.
See the Server CLI Reference for more information about the Brooklyn server process.
The Brooklyn startup script will create a file name
pid_java at the root of
the Brooklyn directory, which contains the PID of the last Brooklyn process to
To stop Brooklyn, simply send a
TERM signal to the Brooklyn process. The PID
of the most recently run Brooklyn process can be found in the
pid_java file at
the root of the Brooklyn directory.
% kill $( cat pid_java )
.zip distributions of Brooklyn, the Brooklyn startup script
will create a file name
pid_java at the root of the Brooklyn directory, which
contains the PID of the last Brooklyn process to be started. You can examine
this file to discover the PID, and then test that the process is still running.
.deb distributions of Brooklyn will use the normal mechanism that
your OS uses, such as writing to
This should lead to a fairly straightforward integration with many monitoring tools - the monitoring tool can discover the expected PID, and can execute the start or stop commands shown above as necessary.
For example, here is a fragment of a
monitrc file as used by
Monit, for a Brooklyn
unpacked and installed at
check process apachebrooklyn with pidfile /opt/apache-brooklyn/pid_java start program = "/bin/bash -c '/opt/apache-brooklyn/bin/brooklyn launch --persist auto & disown'" with timeout 10 seconds stop program = "/bin/bash -c 'kill $( cat /opt/apache-brooklyn/pid_java )'"
In addition to monitoring the Brooklyn process itself, you will almost certainly want to monitor resource usage of Brooklyn. In particular, please see the Requirements section for a discussion on Brooklyn’s disk space requirements.