2. 检查整个复制环境状况(node5 监控节点上操作),如下:
# masterha_check_repl --conf=/etc/masterha/app1.cnf
Sun May 1 22:46:44 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May 1 22:46:44 2016 - [info] Reading application default configuration from /etc/masterha/app1.cnf..
Sun May 1 22:46:44 2016 - [info] Reading server configuration from /etc/masterha/app1.cnf..
Sun May 1 22:46:44 2016 - [info] MHA::MasterMonitor version 0.56.
Sun May 1 22:46:45 2016 - [info] GTID failover mode = 0
Sun May 1 22:46:45 2016 - [info] Dead Servers:
Sun May 1 22:46:45 2016 - [info] Alive Servers:
Sun May 1 22:46:45 2016 - [info] 192.168.1.121(192.168.1.121:3306)
Sun May 1 22:46:45 2016 - [info] 192.168.1.122(192.168.1.122:3306)
Sun May 1 22:46:45 2016 - [info] 192.168.1.123(192.168.1.123:3306)
Sun May 1 22:46:45 2016 - [info] Alive Slaves:
Sun May 1 22:46:45 2016 - [info] 192.168.1.122(192.168.1.122:3306) Version=5.6.29-log (oldest major version between slaves) log-bin:enabled
Sun May 1 22:46:45 2016 - [info] Replicating from 192.168.1.121(192.168.1.121:3306)
Sun May 1 22:46:45 2016 - [info] Primary candidate for the new Master (candidate_master is set)
Sun May 1 22:46:45 2016 - [info] 192.168.1.123(192.168.1.123:3306) Version=5.6.29-log (oldest major version between slaves) log-bin:enabled
Sun May 1 22:46:45 2016 - [info] Replicating from 192.168.1.121(192.168.1.121:3306)
Sun May 1 22:46:45 2016 - [info] Current Alive Master: 192.168.1.121(192.168.1.121:3306)
Sun May 1 22:46:45 2016 - [info] Checking slave configurations..
Sun May 1 22:46:45 2016 - [info] read_only=1 is not set on slave 192.168.1.122(192.168.1.122:3306).
Sun May 1 22:46:45 2016 - [warning] relay_log_purge=0 is not set on slave 192.168.1.122(192.168.1.122:3306).
Sun May 1 22:46:45 2016 - [info] read_only=1 is not set on slave 192.168.1.123(192.168.1.123:3306).
Sun May 1 22:46:45 2016 - [warning] relay_log_purge=0 is not set on slave 192.168.1.123(192.168.1.123:3306).
Sun May 1 22:46:45 2016 - [info] Checking replication filtering settings..
Sun May 1 22:46:45 2016 - [info] binlog_do_db= , binlog_ignore_db=
Sun May 1 22:46:45 2016 - [info] Replication filtering check ok.
Sun May 1 22:46:45 2016 - [info] GTID (with auto-pos) is not supported
Sun May 1 22:46:45 2016 - [info] Starting SSH connection tests..
Sun May 1 22:46:46 2016 - [info] All SSH connection tests passed successfully.
Sun May 1 22:46:46 2016 - [info] Checking MHA Node version..
Sun May 1 22:46:47 2016 - [info] Version check ok.
Sun May 1 22:46:47 2016 - [info] Checking SSH publickey authentication settings on the current master..
Sun May 1 22:46:47 2016 - [info] HealthCheck: SSH to 192.168.1.121 is reachable.
Sun May 1 22:46:47 2016 - [info] Master MHA Node version is 0.56.
Sun May 1 22:46:47 2016 - [info] Checking recovery script configurations on 192.168.1.121(192.168.1.121:3306)..
Sun May 1 22:46:47 2016 - [info] Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/usr/local/mysql/data/ --output_file=/tmp/save_binary_logs_test --manager_version=0.56 --start_file=master-bin.000008
Sun May 1 22:46:47 2016 - [info] Connecting to root@192.168.1.121(192.168.1.121:22)..
Creating /tmp if not exists.. ok.
Checking output directory is accessible or not..
ok.
Binlog found at /usr/local/mysql/data/, up to master-bin.000008
Sun May 1 22:46:48 2016 - [info] Binlog setting check done.
Sun May 1 22:46:48 2016 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Sun May 1 22:46:48 2016 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.1.122 --slave_ip=192.168.1.122 --slave_port=3306 --workdir=/tmp --target_version=5.6.29-log --manager_version=0.56 --relay_log_info=/usr/local/mysql/data/relay-log.info --relay_dir=/usr/local/mysql/data/ --slave_pass=xxx
Sun May 1 22:46:48 2016 - [info] Connecting to root@192.168.1.122(192.168.1.122:22)..
Checking slave recovery environment settings..
Opening /usr/local/mysql/data/relay-log.info ... ok.
Relay log found at /usr/local/mysql/data, up to node2-relay-bin.000002
Temporary relay log file is /usr/local/mysql/data/node2-relay-bin.000002
Testing mysql connection and privileges..Warning: Using a password on the command line interface can be insecure.
done.
Testing mysqlbinlog output.. done.
Cleaning up test file(s).. done.
Sun May 1 22:46:48 2016 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.1.123 --slave_ip=192.168.1.123 --slave_port=3306 --workdir=/tmp --target_version=5.6.29-log --manager_version=0.56 --relay_log_info=/usr/local/mysql/data/relay-log.info --relay_dir=/usr/local/mysql/data/ --slave_pass=xxx
Sun May 1 22:46:48 2016 - [info] Connecting to root@192.168.1.123(192.168.1.123:22)..
Checking slave recovery environment settings..
Opening /usr/local/mysql/data/relay-log.info ... ok.
Relay log found at /usr/local/mysql/data, up to slave-relay-bin.000012
Temporary relay log file is /usr/local/mysql/data/slave-relay-bin.000012
Testing mysql connection and privileges..Warning: Using a password on the command line interface can be insecure.
done.
Testing mysqlbinlog output.. done.
Cleaning up test file(s).. done.
Sun May 1 22:46:48 2016 - [info] Slaves settings check done.
Sun May 1 22:46:48 2016 - [info]
192.168.1.121(192.168.1.121:3306) (current master)
+--192.168.1.122(192.168.1.122:3306)
+--192.168.1.123(192.168.1.123:3306)
Sun May 1 22:46:48 2016 - [info] Checking replication health on 192.168.1.122..
Sun May 1 22:46:48 2016 - [info] ok.
Sun May 1 22:46:48 2016 - [info] Checking replication health on 192.168.1.123..
Sun May 1 22:46:48 2016 - [info] ok.
Sun May 1 22:46:48 2016 - [info] Checking master_ip_failover_script status:
Sun May 1 22:46:48 2016 - [info] /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=192.168.1.121 --orig_master_ip=192.168.1.121 --orig_master_port=3306
IN SCRIPT TEST====/etc/init.d/keepalived stop==/etc/init.d/keepalived start===
Checking the Status of the script.. OK
Sun May 1 22:46:48 2016 - [info] OK.
Sun May 1 22:46:48 2016 - [warning] shutdown_script is not defined.
Sun May 1 22:46:48 2016 - [info] Got exit code 0 (Not master dead).
MySQL Replication Health is OK.
[root@node5 masterha]#
MySQL MHA高可用环境搭建(6)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/33f1d15d8837f955282f8c830e136209.html