These two days have a very strange problem, I intend to share with you. Only so strange estimate is oneself knowledge is not enough. MHA on the line has not switched on automatically, are manually switched, and recently switched on automatically, after exiting the SecureCRT window to find the monitoring process unexpectedly quit. The error log is as follows:
MHA Version: 0.56
Checking The Status of the script. OK Thu Jul - One: -: , -- [Info] OK. Thu Jul - One: -: , --[WARNING] shutdown_script is not defined. Thu Jul - One: -: , -- [Info] Set MasterPingInterval5seconds. Thu Jul - One: -: , --[WARNING] secondary_check_script is not defined. It is highly recommended setting it to check the master reachability from the OR Moreroutes. Thu Jul - One: -: , -- [Info] StartingPingHealth Check on10.69.237.181(10.69.237.181:3306).. Thu Jul - One: -: , -- [Info] Ping (SELECT) succeeded, waitinguntilMySQL doesn't respond.Thu Jul 11:59:12-[INFO] Got terminate signal. Exit.
You can see the log with got terminate signal. Exit. Tips. The starting method is no different from the official, the official start-up monitoring process is as follows:
The monitoring process exits unexpectedly after the nohup is hung to the background to perform discovery exits SecureCRT. Finally, the command is written into the script, and then the execution is no exception.
Quite simply, the script start_monitor.sh as follows:
#!/bin/bash/usr/bin/nohup/usr/local/bin/masterha_manager--conf=/data/mha/3306/mha.cnf-- Ignore_last_failover >/data/mha/33062>&1 &
Start monitoring:
/bin/bash Start_monitor. SH
Of course, the official mentions another method, which is run using daemon, which is to avoid the MHA of the process exit after the switch.
Resources:
Https://code.google.com/p/mysql-master-ha/wiki/Runnning_Background
MHA Monitoring Process Exception exit