MSP Center Plus Failover
It is very very essential, at the same time quite difficult to ensure 100% availability of the Central server. There are chances of DB getting crashed, Server going down etc., where your effective monitoring gets halted. If the Central DB crashes, it takes hours (depending on the data size) to restore and resume the service. Also, it is very complicated and time consuming to take backups of the Central, periodically. As the data grows more and more, the complication and the time in taking backups also grows more and more.
Failover is the best and the recommended technique to overcome these issues and to achieve 100% availability of the Central Server.
You can configure failover at the following cases- Configuring Failover at the Initial stage i.e., immediately after fresh installation.
- Configuring Failover at the Later stage i.e., at the stage where the product has been running for quite some time.
Ensure that MySQL always runs on both the Primary and Failover Central server.
Note: How Failover affects desktop & remote agents ? Desktop
& Remote agents don't have a means of knowing the failover central server and hence
failover will affect all agents. To overcome this you need to create a
subdomain such as https://service.companyname.com and NAT it
alternatively to primary and failover central server.
|
Configuring Failover at the initial stage Configuring failover server during the very initial stage (immediately after installing the Central and probe), reduces the following hassles.
- Periodical backups.
- Quick recovery, if the Primary Central server crashes.
Steps to configure the failover:
In Primary Central server - Open the file my.cnf [<primary_central_home>\mysql\data] and configure the following
- Uncomment the commented entries except the first line (first line must be commented and the remaining should be uncommented).
- Change the following
master-host=<Failover central server's name/IP address>
master-port=<Port Number in which you want to run the central server mysql>
Example:
master-host=failoverserver-win2k
master-port=23306 - Add the following lines next to the 'replicate-do-db=dmsdb'.
replicate-do-db=desktopcentral
replicate-do-db=jbossdb
replicate-do-db=supportcenter
After entering these lines it should look like
replicate-do-db=dmsdb
replicate-do-db=desktopcentral
replicate-do-db=jbossdb
replicate-do-db=supportcenter
- Open the file serverparameters.conf [<primary_central_home>\conf] and add the following entries after the last line.
ENABLE_DB_RECONNECTION true
DB_REPLICATION true
- Connect to mysql and give the query "grant all on *.* to 'root'@'%';".
- Start the Primary Central Server.
In Failover Central Server - Open the file my.cnf [<failover_central_home>\mysql\data] and configure the following
- Uncomment the commented entries except the first line (first line must be commented and the remaining should be uncommented).
- Change as following
server-id =2
master-host=<Primary central server's name/IP address>
master-port=<Port Number in which you want to run the central server mysql>
Example:
server-id =2
master-host=primaryserver-winxp
master-port=23306 - Add the following lines next to the 'replicate-do-db=dmsdb'.
replicate-do-db=desktopcentral
replicate-do-db=jbossdb
replicate-do-db=supportcenter
After entering these lines it should look like
replicate-do-db=dmsdb
replicate-do-db=desktopcentral
replicate-do-db=jbossdb
replicate-do-db=supportcenter
- Copy the server.keystore [<primary_central_home>\tomcat\conf] from the Primary Central server to Failover Central server [<failover_central_home>\tomcat\conf].
- Copy the file http.truststore [<primary_central_home>\conf] from the Primary Central server to the Failover Central server [<failover_central_home>\conf].
- Open the file serverparameters.conf [<primary_central_home>\conf] and add the following entries after the last line.
ENABLE_DB_RECONNECTION true
DB_REPLICATION true
- Start mysql. (In cold start the tables created by Primary takes some time to get copied to slave. The BEFailOver table in the central DB need to have entries when the server is started as FailOver).
- Give the query "grant all on *.* to 'root'@'%';".
- To check whether the DB replication has started for both the Primary and Failover Central DB do the following
- Open the file machinename.err [<central_home>\mysql\data] both in the Primary and Failover server.
- Check for the entry 'Replication started'. If the entry is available, then replication is successfully done.
- Now start the Failover Central server.
- Open the file NOCServerDetails.xml [<probe_home>\conf] and add the following after DMSID="<DMSID>".
StandbyNOCServerName="<Failover Central Server Name>"
StandbyNOCServerPort="<Port number of the Failover Central Server>"
SwitchOverInterval="<Time period after which the probe will start communicating with the Failover Central server>"
Retries="<Count after which the probe will start communicating with the Failover Central server>"
ReEstablishInterval="<Count after which the probe will contact the Primary Central server, once the connection is lost with Primary Central server >"
- Now start the Probe server.
Configuring Failover at the later stage (for existing MSP Center Plus)
In Primary Central Server
- Shut down the Primary Central server.
- Invoke mysql dumb and execute the following query
mysqldump -u root -P 23306 --databases centraldb desktopcentral Jbossdb supportcenter > alldb_backup.sql
where,
23306 - Primary Central server's port where mysql is running
centraldb - Central DBof the Primary Central server
desktopcentral - Desktop Management module's DB
Jbossdb - Remote Agent's DB
supportcenter - Helpdesk module's DB
alldb_backup.sql - File that contains all the SQL statements needed to re-create the DB on the Failover central server.
- Before proceeding to next step [step 4] restore the dump on Failover Central server. Follow the steps 1 to 3 given below for Failover Central server.
- Follow the steps 1 to 4 of Configuring Failover at the intial stage for Primary Central Server.
In Failover Central Server- Start the Failover Central server inorer to get the DB to be created.
- Shut down the Failover Central server.
- invoke mysql and enter the following command
mysql -u root -P 23306 centraldb < alldb_backup.sql - Follow the steps 1 to 8 of Configuring Failover at the intial stage for Failover Central Server.
In Probe ServerFollow the
steps of
Configuring Failover at the intial stage for Probe server.