Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[WANDL] Resynchronizing the IP/MPLSView databases when they become unsynchronized

0

0

Article ID: KB33235 KB Last Updated: 24 Sep 2020Version: 2.0
Summary:

This article describes the steps that are required to re-synchronize the IP/MPLSView backup and primary databases when they become unsynchronized.

Note: This procedure is applicable ONLY to IP/MPLSView versions 6.1.0 and later (currently 6.4.0).

 

Symptoms:

When users find that the primary and backup databases are unsynchronized, they can confirm the same by using the /u/wandl/bin/mysql_repl.sh lastdata command on both the primary database and the backup database. The difference in values can be seen from the output of this command, as seen in the example below:

Primary DB Server

[wandl@RY-WANDL-02 ~]$ /u/wandl/bin/mysql_repl.sh lastdata
20180825036
 

Backup DB Server

[root@ry-wandl-04 data]# /u/wandl/bin/mysql_repl.sh lastdata
20180225173

 

Cause:

This can often be caused by various issues such as the following:

  • Either server was improperly shut down.

  • Either server was interrupted by an event such as a power outage.

 

Solution:

To re-synchronize the IP/MPLSView databases when they become unsynchronized, perform the following steps:

  1. On the backup database, access the MariaDB CLI.
. /u/wandl/bin/mplsenvsetup.sh
/u/wandl/thirdparty/mysql/bin/mysql -uroot -pwandlroot -A wandltraffic
  1. Stop the backup database replication thread with the following command:

stop slave;
  1. Reset (clean) the backup replication data on the backup database with the CLI command, and then exit the MariaDB CLI.

reset slave;
exit
  1. Stop the backup database.

/u/wandl/bin/.mysql stop slave
  1. On the primary database, access the MariaDB CLI.

. /u/wandl/bin/mplsenvsetup.sh
/u/wandl/thirdparty/mysql/bin/mysql -uroot -pwandlroot -A wandltraffic
  1. Reset the primary database replication record with the CLI command, and then exit the MariaDB CLI.

reset master;
exit
  1. Stop IP/MPLSView on the primary application server.

/u/wandl/bin/stop_mplsview
  1. (Optional) Back up the contents of the /u/wandl/data/mysql/data/wandltraffic directory on the backup database server.

  2. Copy the directory and all the files in /u/wandl/data/mysql/data/wandltrafficdirectory from the primary database server to the backup database server.
  3. Repair the MariaDB database tables on the unsynchronized server.

/u/wandl/bin/fixmysql.sh (run on both primary and backup database servers)
  1. When the repair completes, start IP/MPLSView on the primary application server.

/u/wandl/bin/startup_mplsview
  1. Start the backup database.

/u/wandl/bin/.mysql start slave
  1. Register the backup to the primary, and start the replication thread.

/u/wandl/bin/mysql_repl.sh registermaster
  1. On the backup database, access the MariaDB CLI.

. /u/wandl/bin/mplsenvsetup.sh
/u/wandl/thirdparty/mysql/bin/mysql -uroot -pwandlroot -A wandltraffic
  1. Check the backup database for error messages, where database-drive is the letter of the drive on which the backup database resides (for example, \G).

show slave status \database-drive;
  1. Exit the MariaDB CLI.

exit
  1. After waiting for at least five minutes, check the last data received on both the primary application server and the backup database server to make sure that the database tables are re-synchronized.

/u/wandl/bin/mysql_repl.sh lastdata
 

Waiting for at least five minutes before running the mysql_repl.sh lastdata command allows sufficient time for one MariaDB replication cycle to complete. If the command output for the primary application server and the backup database server displays the same timestamp, the database tables are re-synchronized.

For more information about IP/MPLSView, see Getting Started Guide for IP/MPL SView.

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search