Configure RTViewCentral High Availability
This section describes High Availability (HA) for RTViewCentral, the setup options available and how to configure them. HA prevents the loss of data and alerts in the event of a failover.
To setup HA for RTViewCentral you configure a pair of RTViewCentral installations on two different host machines, one as the primary host and the other as the backup host. The HA configuration includes the CentralServer, Display Server and Historian. If one of these processes on the primary host stops, the corresponding process on the backup host takes over. When the primary comes back on line it takes over again and the backup process returns to standby mode. Client connections move between the two servers accordingly.
This section contains:
Requirements
|
•
|
Two host machines, a Primary Host and a Backup Host. |
|
•
|
The RTView processes on both hosts must be able to run against identical properties files. In the case where drivers or other third party jars are located in different directories on the two hosts, create a directory in the same location in each host, copy the jar files into and reference that directory in your properties. |
|
•
|
Both hosts must be configured such that the RTView processes on each host can connect to each other via socket. |
|
•
|
Tomcat or other application server that can access both the Primary Host and Backup Host. Refer to your application server documentation if you need high availability access to your application server. |
|
•
|
Both hosts must be able to access the same Historian, Alert Threshold, CMDB, Diagram Generator and Metric Explorer databases. |
|
•
|
Both hosts must be able to access the same RTViewDataServers which must also be able to access both the Primary and Backup host for RTViewCentral. |
CentralServer HA
In CentralServer HA deployments, the primary and backup CentralServer connect to each other via socket. If the primary CentralServer stops, the backup takes over, if the primary then comes back up, the primary takes back over and the backup goes back to standby. Only the active CentralServer handles data requests.
Data clients for the HA CentralServer have the following options for connecting:
|
•
|
via HA configured rtvdata servlet running on an application server other than the internal Jetty server. This option requires extra configuration of the rtvdata war files. High availability access to the servlets must be configured in the application server. |
|
•
|
rtvquery data clients for CentralServer HA must connect via servlet running on an application server other than the internal Jetty server. This option requires extra configuration of the rtvquery war files. High availability access to the servlets must be configured in the application server. |
|
•
|
via socket using a fault tolerant URL (//PRIMARYHOST:3278,//BACKUPHOST:3278). |
Display Server HA
In Display Server HA deployments, the primary and backup Display Server do not connect to each other. The rtvdisplay servlet is configured to connect to the primary Display Server first and if that connection fails, the servlet tries to connect to the backup Display Server. Likewise, when the backup Display Server connection fails, the servlet tries to connect to the primary Display Server.
If the DisplayServerConnectionFailback property is set to true, the rtvdisplay servlet reconnects to the primary server when it comes back on line. If set to false, it does not reconnect to the primary server unless the backup server becomes unavailable.
The Display Server is a client of the CentralServer and connects to it via fault tolerant URL (socket). This means that the data servers and historians can fail over separately or together.
Historian HA
In Historian HA deployments, the primary and backup Historian connect to each other via socket. If the primary Historian stops, the backup takes over. If the primary then comes back on line, the primary takes over and the backup goes back into standby mode. Only the active Historian writes to the database.
The Historian is a client of the CentralServer and connects to it via fault tolerant URL (socket). This means that the CentralServer and Historians can fail over separately or together.
Configuration Steps
To configure HA for RTViewCentral you setup the Primary and Backup Hosts, verify your setup, test the failover process to the Backup Host and verify the Primary Host is restored to the primary server for the pair.
To Configure RTViewCentral HA:
|
1.
|
On both the primary and backup hosts, define PRIMARYSERVER and BACKUPSERVER environment variables: |
PRIMARYHOST - the IP address or hostname of the host running the primary servers (ex set PRIMARYHOST=MyHost).
BACKUPHOST - the IP address or hostname of the host running the backup servers (ex. set BACKUPHOST=OtherHost).
|
2.
|
Install RTViewCentral on the primary and backup host. |
|
3.
|
Configure the RTViewCentral servlets to be HA and deploy them to your application server: |
|
–
|
cd to projects\rtview-server |
|
–
|
In a text editor, open update_wars (.bat or .sh) and fill in the values for HOST, HA_HOST, HA_DISPLAYHOST and HA_FAILBACK as described in the script. |
|
–
|
Run the update_wars (.sh or .bat) script. |
|
–
|
Copy the generated war files to the webapps directory of your application server. |
|
4.
|
If you are using the RTView Manager, repeat step 3 in the projects\rtview-manager directory. |
|
5.
|
On the primary host, open a Windows command line (or a terminal window for UNIX) and execute the following script, located in the RTViewCentral/bin directory, to start the servers: start_servers-haprimary (or start_servers.sh-haprimary for UNIX). |
|
6.
|
On the backup host, open a Windows command line (or a terminal window for UNIX) and execute the following script, located in the RTViewCentral/bin directory, to start the servers: start_servers-habackup (or start_servers.sh-habackup for UNIX). |
|
7.
|
Configure RTViewCentral using the RTView Configuration Application. Note that the RTView Configuration Application must be able to connect to both the primary and backup servers in order to enable editing. The same properties are saved to both servers. The RESTART SERVERS button restarts both the primary and backup servers at the same time. If you want to stagger the restarts, use the script under bin to stop, then start your servers after making changes in the Configuration Application. |
|
•
|
configure all server options |
|
•
|
enable and configure alert persistence |
Note: Jetty does not have to be disabled, but data clients will not be able to make high availability connections to these servers using the Jetty URL - they can still use the Jetty URL to configure their application.
|
8.
|
Verify failover and failback of RTViewCentral. |
|
•
|
On the primary host, stop the servers by executing the following script, located in the RTViewCentral/bin directory: stop_servers (or stop_servers.sh for UNIX). |
It might take a few seconds to fail over.
|
•
|
Return to the browser and verify the monitor is still available and you still see services, solution package data and alerts as expected. |
|
•
|
On the primary host, restart the servers by executing the following script, located in the RTViewCentral/bin directory: start_servers -haprimary (or start_servers.sh -haprimary for UNIX). |
|
9.
|
If you encounter issues, look at the following in the log files. |
This error indicates that you didn’t set the PRIMARYHOST or BACKUPHOST environment variable:
ERROR: Disabling HA because the PRIMARYHOST and/or BACKUPHOST environment variable is not set.
You have finished configuring High Availability.
©2013-2021 Sherrill-Lubinski Corporation. All Rights Reserved.