If you have already created a node directory (using create-node.sh
), just editing the configuration file in etc/default/config
won’t work.
When you create a node directory, the system copies files from etc/default/config
to node-NNN/config
.
If the environment changes, you should always modify $RHINO_HOME/etc/defaults_config/config_variables
.
And if node-NNN
directories already exist, apply the same changes to the node-NNN/config/config_variables
file (for all NNN
).
Note also that a Rhino node only reads the configuration file when it starts — so if you change the configuration, the node must be restarted for the changes to take effect. |
Follow the instructions below to configure: default variables, ports, usernames and passwords and watchdog.
Default configuration variables
After installation, you can modify the default configuration variables if needed, for each node, by editing node-NNN/config/config_variables
.
This file includes the following entries:
Entry | Description |
---|---|
RHINO_BASE |
Absolute path to installation |
RHINO_WORK_DIR |
Absolute path to working directory for node. (present but not meaningful in |
RHINO_HOME |
Absolute path to your installation/node. (installation for |
FILE_URL |
Internal setting, do not change. |
JAVA_HOME |
Absolute path to the JDK. |
JVM_ARCH |
Whether to use the default 32-bit JVM ( |
MANAGEMENT_DATABASE_NAME |
Name of the database where the SLEE stores its state. |
MANAGEMENT_DATABASE_HOST |
TCP/IP host where the database resides. |
MANAGEMENT_DATABASE_PORT |
TCP/IP port that the database listens to. |
MANAGEMENT_DATABASE_USER |
Username used to connect to the database. |
MANAGEMENT_DATABASE_PASSWORD |
Password used to connect to the database, in plaintext. |
SESSION_OWNERSHIP_FACILITY_ENABLED |
Boolean flag used to indicate whether or not the session ownership subsystem should be enabled in the default namespace. |
REPLICATED_STORAGE_RESOURCE |
The name of the replicated storage resource (memdb instance) that will be used for the default namespace. |
CASSANDRA_CONTACT_POINTS |
Comma-separated list, surrounded by square brackets, of individually escape-quoted |
CASSANDRA_DATACENTRE |
The name of the local datacentre present at the specified Cassandra contact points.
Only used where |
RMI_MBEAN_REGISTRY_PORT |
Port used for RMI connections. |
JMX_SERVICE_PORT |
Port used for JMX connections. |
RHINO_SSL_PORT |
Port used for SSL connections. |
SNAPSHOT_BASEPORT=22000 |
Port used for creating Rhino snapshots. |
HEAP_SIZE |
Maximum heap size that the JVM may occupy in the local computer’s memory. |
MAX_NEW_SIZE |
Maximum new space size in heap (must be smaller than HEAP_SIZE) |
NEW_SIZE |
Initial new space size. |
RHINO_CLIENT_STORE_PASS |
Password for the Rhino client keystore |
RHINO_SERVER_STORE_PASS |
Password for the Rhino server keystore |
RHINO_CLIENT_KEY_PASS |
Password for the Rhino client private key. |
RHINO_SERVER_KEY_PASS |
Password for the Rhino server private key. |
RHINO_PASSWORD |
Rhino JMX administrator password |
RHINO_USERNAME=admin |
Rhino JMX administrator username |
LOCAL_IPS |
List of IP addresses (delimited by white spaces) that refer to the local host. IPv6 addresses are expressed in square brackets. |
RHINO_WATCHDOG_STUCK_INTERVAL |
The period (in milliseconds) after which a worker thread is presumed to be stuck. |
RHINO_WATCHDOG_THREADS_THRESHOLD |
Percentage of alive threads required. (100 means all threads must stay unstuck) |
SAVANNA_COMMS_MODE |
Communication mode to use for cluster membership. Every node in the cluster must have the same mode. |
SAVANNA_SCAST_BASE_PORT |
Base port to use in scattercast mode when automatically assigning ports. Every node in the cluster must have the same value. |
SAVANNA_SCAST_PORT_OFFSET |
Offset to use in scattercast mode when automatically assigning ports. Every node in the cluster must have the same value |
SAVANNA_CLUSTER_ID |
Integer that must be unique to the entire cluster, but must be the same value for every node in this cluster. Several clusters sharing the same multicast address ranges can co-exist on the same physical network provided that they have unique cluster IDs. |
SAVANNA_MCAST_START |
Start of an address range that this cluster uses to communicate with other cluster nodes. (multicast only)
Every node on this cluster must have the same settings for |
SAVANNA_MCAST_END |
End of an address range that this cluster uses to communicate with other cluster nodes. (multicast only) |
NODE_ID |
Unique integer identifier, in the range of 0 to 255, that refers to this node. Each node in a cluster must have a unique node ID. |
Typically, these values should not need to be changed unless environmental changes occur, for example:
|
Configure ports
The ports chosen during installation time can be changed at a later stage by editing the file $RHINO_HOME/etc/defaults/config/config_variables
.
See the default configuration variables. |
Configure usernames and passwords
The default usernames and passwords for remote JMX access can be changed by editing the file $RHINO_HOME/etc/defaults/config/rhino.passwd
.
For example,
# Rhino password file used by the FileAuthLoginModule JAAS login module (to authenticate JMX Remote connections) # Format is username:password:rolelist # Rhino admin user (admin role has all permissions) ${RHINO_USERNAME}:${RHINO_PASSWORD}:admin # Additional users rhino:rhino:rhino,view view:view:view
For more on usernames and passwords, see the Rhino Administration and Deployment Guide. |
Configure watchdog
The watchdog thread is a lightweight thread which monitors the Rhino SLEE for undesirable behaviour. Currently, the only user-configurable settings for the watchdog thread relate to its behaviour when dealing with stuck worker threads. A stuck worker thread is a thread which has taken more than a reasonable period of time to execute the service logic associated with an event. The cause for this may be faulty service logic, or service logic which blocks while waiting on an external resource (such as a database).
The period (in milliseconds) after which a worker thread is presumed to be stuck can be configured by editing the RHINO_WATCHDOG_THREADS_THRESHOLD
variable in $RHINO_HOME/etc/defaults/config/config_variables
, for example:
RHINO_WATCHDOG_STUCK_INTERVAL=45000
If too many worker threads become stuck, there can be a performance impact on the Rhino SLEE, and in extreme cases can prevent all future event processing entirely. The watchdog thread can be configured to terminate a node in the event that a certain percentage of its worker threads have become stuck by modifying the variable;
RHINO_WATCHDOG_THREADS_THRESHOLD=50
The value specified for RHINO_WATCHDOG_THREADS_THRESHOLD
in $RHINO_HOME/etc/defaults/config/config_variables
is the percentage of worker threads which must remain alive (unstuck) before a node will self-terminate.
If RHINO_WATCHDOG_THREADS_THRESHOLD
is set to 100
, it means that if any of the worker threads become stuck, the node will terminate itself.
If this setting is set to 0
, it means that the node will never terminate itself due to stuck worker threads.
This provides a mechanism for cluster nodes which have stuck worker threads to free up those threads by terminating the JVM and restarting (assuming the nodes have been configured to restart automatically).
By default, the watchdog thread will kill a node in which less than half (50
) of the worker threads are still alive.
See also the default configuration variables. |