测试成功,开启manager:
[root@zbdba1 masterha]# nohup masterha_manager --conf=/etc/masterha/app1.cnf&
?
监控日志文件:
?
Wed Feb 11 02:12:02 2015 - [info] MHA::MasterMonitor version 0.56. Wed Feb 11 02:12:02 2015 - [warning] /masterha/app1/app1.master_status.health already exists. You might have killed manager with SIGKILL(-9), may run two or more monitoring process for the same application, or use the same working directory. Check for details, and consider setting --workdir separately. Wed Feb 11 02:12:02 2015 - [info] GTID failover mode = 0 Wed Feb 11 02:12:02 2015 - [info] Dead Servers: Wed Feb 11 02:12:02 2015 - [info] Alive Servers: Wed Feb 11 02:12:02 2015 - [info] 192.168.56.161(192.168.56.161:3306) Wed Feb 11 02:12:02 2015 - [info] 192.168.56.162(192.168.56.162:3306) Wed Feb 11 02:12:02 2015 - [info] Alive Slaves: Wed Feb 11 02:12:02 2015 - [info] 192.168.56.162(192.168.56.162:3306) Version=5.5.35-log (oldest major version between slaves) log-bin:enabled Wed Feb 11 02:12:02 2015 - [info] Replicating from 192.168.56.161(192.168.56.161:3306) Wed Feb 11 02:12:02 2015 - [info] Primary candidate for the new Master (candidate_master is set) Wed Feb 11 02:12:02 2015 - [info] Current Alive Master: 192.168.56.161(192.168.56.161:3306) Wed Feb 11 02:12:02 2015 - [info] Checking slave configurations.. Wed Feb 11 02:12:02 2015 - [info] read_only=1 is not set on slave 192.168.56.162(192.168.56.162:3306). Wed Feb 11 02:12:02 2015 - [warning] relay_log_purge=0 is not set on slave 192.168.56.162(192.168.56.162:3306). Wed Feb 11 02:12:02 2015 - [info] Checking replication filtering settings.. Wed Feb 11 02:12:02 2015 - [info] binlog_do_db= , binlog_ignore_db= Wed Feb 11 02:12:02 2015 - [info] Replication filtering check ok. Wed Feb 11 02:12:02 2015 - [info] GTID (with auto-pos) is not supported Wed Feb 11 02:12:02 2015 - [info] Starting SSH connection tests.. Wed Feb 11 02:12:03 2015 - [info] All SSH connection tests passed successfully. Wed Feb 11 02:12:03 2015 - [info] Checking MHA Node version.. Wed Feb 11 02:12:03 2015 - [info] Version check ok. Wed Feb 11 02:12:03 2015 - [info] Checking SSH publickey authentication settings on the current master.. Wed Feb 11 02:12:03 2015 - [info] HealthCheck: SSH to 192.168.56.161 is reachable. Wed Feb 11 02:12:04 2015 - [info] Master MHA Node version is 0.56. Wed Feb 11 02:12:04 2015 - [info] Checking recovery script configurations on 192.168.56.161(192.168.56.161:3306).. Wed Feb 11 02:12:04 2015 - [info] Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/var/lib/mysql --output_file=/var/tmp/save_binary_logs_test --manager_version=0.56 --start_file=mysql-bin.000002 Wed Feb 11 02:12:04 2015 - [info] Connecting to root@192.168.56.161(192.168.56.161:22).. Creating /var/tmp if not exists.. ok. Checking output directory is accessible or not.. ok. Binlog found at /var/lib/mysql, up to mysql-bin.000002 Wed Feb 11 02:12:04 2015 - [info] Binlog setting check done. Wed Feb 11 02:12:04 2015 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers.. Wed Feb 11 02:12:04 2015 - [info] Executing command : apply_diff