MSP Center Plus Failover

Tags:  

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
  1. Configuring Failover at the Initial stage i.e., immediately after fresh installation.
  2. 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
  1. Open the file my.cnf [<primary_central_home>\mysql\data] and configure the following
    1. Uncomment the commented entries except the first line (first line must be commented and the remaining should be uncommented).
    2. 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
    3. 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

  2. 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
  3. Connect to mysql and give the query "grant all on *.* to 'root'@'%';".
  4. Start the Primary Central Server.

In Failover Central Server
  1. Open the file my.cnf [<failover_central_home>\mysql\data] and configure the following
    1. Uncomment the commented entries except the first line (first line must be commented and the remaining should be uncommented).
    2. 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
    3. 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

  2. Copy the server.keystore [<primary_central_home>\tomcat\conf] from the Primary Central server to Failover Central server [<failover_central_home>\tomcat\conf].
  3. Copy the file http.truststore [<primary_central_home>\conf] from the Primary Central server to the Failover Central server [<failover_central_home>\conf].
  4. 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
  5. 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).
  6. Give the query "grant all on *.* to 'root'@'%';".
  7. To check whether the DB replication has started for both the Primary and Failover Central DB do the following
    1. Open the file machinename.err [<central_home>\mysql\data] both in the Primary and Failover server.
    2. Check for the entry 'Replication started'. If the entry is available, then replication is successfully done. 
  8. Now start the Failover Central server.

In Probe Server
  1. 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 >"
  2. Now start the Probe server.

Configuring Failover at the later stage (for existing MSP Center Plus)

In Primary Central Server
  1. Shut down the Primary Central server.
  2. 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.
  3. 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.
  4. Follow the steps 1 to 4 of Configuring Failover at the intial stage for Primary Central Server.

In Failover Central Server
  1. Start the Failover Central server inorer to get the DB to be created.
  2. Shut down the Failover Central server.
  3. invoke mysql and enter the following command
    mysql -u root -P 23306 centraldb < alldb_backup.sql
  4. Follow the steps 1 to 8 of Configuring Failover at the intial stage for Failover Central Server.
In Probe Server
Follow the steps of Configuring Failover at the intial stage for Probe server.






 RSS of this page

Written by:   Written by:   Version:   Last Edited By:   Modified

rtttr rb