Troubleshooting Tips > OpManagerMSP FailOver

OpManagerMSP FailOver

Tags:  

 

FAILOVER SETUP FOR OPMANAGER MSP CENTRAL


To configure OpManager MSP Central in high availaibility mode,we have two central servers running each with its own database.The two databases are configured in two way replication mode so that they are synchronized with each other.One of the central servers starts as primary and the other server as secondary.If the primary goes down,the secondary could take over vice-versa and no data is lost.


Consider the following setup:
          1. Central1 and Central2

          2. Central1 DB called as DB1 and Central2 DB called as DB2

          3. Probe1 and Probe2

Note: In two way replication, both the Mysql Databases, DB1 and DB2 has to be configured as Master as well as slave.


Failover setup:
  1. Central1 is connected with DB1

  2. Central2 is connected with DB2

  3. Probes are connected with Central1


Different Failover Scenarios:


  1. Both the Central will Run

        (a) Central1 connected with DB1

        (b) Central2 connected with DB2

        (c) Probe1 and Probe2 are Connected with Central1

        (d) DB1 and DB2 should have synchronous with each other

  2. Central1 Fails

        Central2 connected with DB2 take over the functions automatically and act as primary server ,Probes connected with Central1 automatically will re-connected with Central2







    3.DB2 Fails

        (a) Central2 acting as primary and connected with DB2

        (b) Probe1 and Probe2 are Connected with Central2

        (c) Central1 is up and running (Now as a secondary server)

        Result:  Central2 is shut down saying that connection to the database is lost. Central1 takes over again and starts acting as the primary server. Probes connected to Central2 again reconnect to Central1.





    4.Central2 Fails

        (a) Central2 acting as primary and connected with DB2

        (b) Probe1 and Probe2 are Connected with Central2

        (c) Central1 is up and running (Now as a secondary server)

        Result:  Central1 takes over the functions of Central2 and starts acting again as the primary server. Probes will reconnect with Central1.



FailOver Setup Configuratons:


Step 1: Database Installation and Replication Configuration



1.Install the Mysql 4.1.12 or higher version.

 2.Edit the my.cnf file present under mysql home and add the following entries

            server-id=1[give different id for master and slave]

            port=23306

            log-bin=mysql-bin

            master-connect-retry=10

            log-slave-updates

            master-connect-retry=10

            skip-slave-start

            binlog_cache_size=32768

            max_binlog_cache_size=4294967295

            max_binlog_size=52428800

            master-host=192.168.112.235[ in DB1 give DB2 ipaddress and in DB2 give DB1 ipaddress]

            master-port=23306

            master-user=replication 

            master-password=slave


 3.Start mysql by running the following command

    C:\mysql \bin>mysqld-nt --defaults-file=c:\mysql\my.ini -u root -P 23306        




 4.Connect to the mysql client






 5.Check the server id that we have configured in my.cnf file


 6.Give replication priveleges to user by executing the following command






 7.check the user privilege details in mysql.user table






 8.Start the slave by running the start slave query

    mysql>start slave;



 9.Check the Master and Slave status by running the following queries

     (Make sure that the Slave_IO_Running and Slave_SQL_Running threads are running status is yes in slave status)










   10.In slave status,Check the Master_Log_File and Master_Log_Pos, which is under master status  If there is any mismatch or there is no log file and log file  position then manually update it by,                                           

        mysql >CHANGE MASTER TO MATER_LOG_FILE="mysql-bin.001',MASTER_LOG_POS=<position>;                     


   11.Repeat all the above steps in both databases DB1 and DB2 and make sure the replication of datas between DB1 to DB2, vice-versa.



    Step 2:  OpManager Central Configuration:


    1.In database_params.conf under <Central-Home>/conf directory,edit the jdbc connection url and give the  ip of the DB system instead of localhost                          
        i.e in Central1's file give the ipaddress of DB1 system and in Central2's file give the ipaddress of DB2 system.


    2.Add the following entries in serverparameters.conf file under <Central-Home>/conf directory

        ENABLE_DB_RECONNECTION  true          
        DB_REPLICATION                   true          

    3.Start Central1 by running StartOpManagerServer.bat




    4.Then start the central2, if the Central1 is running as primary , then Central2 will starts like,





    5.check the status of master and slave in befailover table under centraldb in both DB1 and DB2                    





     6.If the Central1 server will down then the Central2 will take over the entire procees of Central1,




    now the Central2 becomes primary and if we will try to start the Central1 ,it will start as a standby server                      




    once the Central2 server will down then the Central1 will take over the process and it will switch to primary server                       






    if both Central1 and Central2 will Run then the befailover table entry will be                          ,





    When Central failure occurs then the Probes that are connected with the Central1 will try to communicate with the Central2





Step 3: Supportcenter side Configurations:                                                                                                                  

                  1.Edit the mysql-ds.xml file present under central\supportcenter\server\default\deploy directory and give the ip and port that of  the DB1 is configured                                                                                                                                                                                    

      2.Edit the nms-service.xml file present under central\supportcenter\server\default\conf and give false instead of true in the following parameter

              <attribute name="StartDBServer">false</attribute>                                                                                            
                                                                                                              

 3.Edit the run.bat file present under central\supportcenter\bin and comment the following lines,                                                                

rem DB_HOME=%HOME_DIR%\mysql                                                                                                                         
rem  JAVA_OPTS=%JAVA_OPTS% -Ddb.home=%DB_HOME%                                                                

and remove the %JAVA_OPTS% from the following line,

                  set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -Djboss.server.type=com.adventnet.j2ee.deployment.system.AdventNetServerImpl                          -Djboss.boot.library.list=log4j-boot.jar,jboss-common.jar,jboss-system.jar,AdventNetDeploymentsystem.jar,commons-logging.jar                                                                                                                                       
                

                  4.Edit the setcommonenv.bat file present under central\supportcenter\bin and comment the following line,                                                                     

                                rem DB_HOME=%HOME_DIR%\mysql                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                                      


    Step 4: Probe side Configurations:                                  


    1.Edit the  NOCServerDetails.xml file under <probe-home>/conf directory and add entries for standby server

        <Details  NOCServerName="192.168.113.66" NOCServerPort="443" DMSID="CUBE"                  
        StandByNOCServerName= "<ipaddress of standby server> " StandByNOCServerPort="443" Retries="10" SwitchOverInterval="60"/>                    


    2.  Copy the Central1's Central.cer file Present under central\apache\conf\ssl.crt and keep it in Test folder, and rename the Central.cer to Central1.cer  and copy the same file from Central2 and keep it in the same folder and rename it to Central2.crt     

    Execute the following command in command prompt from the location into which the file has been copied.




    The above commands produces https.truststore file under Test directory.Copy the above file and replace it in <Probe-Home>\Conf directory for all the probes connected with Central1.








      





 RSS of this page

rtttrrb