Production rhino ships with a set of scripts for running rhino as an autostarted system service.
To use these scripts on system start, the scripts can be copied into /etc/init.d and then symlinked into /etc/rc*.d/ as appropriate.
By default, the scripts will start Rhino with all JVM and console output redirected to a rolling log file in work/log/console.log. The main Rhino logs will be written to work/log/rhino.log, and all associated configuration logging will be written to work/log/config.log.
By default, Rhino will be started as the user who originally created the script (via create-node.sh).
This can be modified by editing the
RHINO_USER variable in the script.
There are two variants of the scripts, a per node variant, and a host wide variant. We recommend using the host wide script variant when housing multiple nodes on each host.
Every node contains an init.d script for managing itself.
This script can be found at
xxx is intended to operate as a quorum node, the
rhino-node-xxx script will need to be modified before use to
replace the '-s' argument with '-q'.
The command line options used during Rhino start can be found in the script in the
If configuring a cluster for the first time (i.e. where no previous cluster state exists) and the 'make primary' option to create-node.sh was not specified for one of the nodes, then the cluster must be manually made primary.
The recommended initial setup procedure is to start each node via its associated init.d script and then run 'make-primary.sh' on one (and only one) of them. This additional setup step should only be performed once to initialise the cluster state.
Adding the '-p' start argument to the init.d script itself is NOT supported and will result in nodes failing to start correctly.
There is an init.d script that manages multiple nodes, in
The script requires two variables to be set.
RHINO_BASE: location of the Rhino installation
RHINO_USER: user to run Rhino as
It will detect nodes automatically, but it is recommended to set the
RHINO_QUORUM_NODES variables explicitly
(this is typically done in
$RHINO_BASE/rhino.env which is also used by the rhino.sh control script).
If starting a cluster for the first time (i.e. where no previous cluster state exists) and the 'make primary' option to create-node.sh
was not specified for one of the nodes, then the cluster must be manually made primary (by using the
make-primary.sh script in a node directory).
Do not add the '-p' start argument to the init.d script, it will result in nodes failing to start correctly.
There is a sample Systemd service control file equivalent to the host-wide init script for use on RHEL 7 and similar systems.
The service file assumes a Rhino installation in
It delegates to rhino.sh and expects
RHINO_QUORUM_NODES to be set in
This service file must be modified to match the Rhino install path on the system and should have the dependency on PostgreSQL removed if using Oracle.
Like the host-wide init script it does not cause a new cluster to become primary automatically.
This must be done on node creation or by using the
make-primary.sh script in a node directory.