(2)测试复制功能是否正常
[root@node4 mha4mysql-manager-0.56]# masterha_check_repl --conf=/etc/masterha/app1.cnf Thu Nov 10 23:07:35 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping. Thu Nov 10 23:07:35 2016 - [info] Reading application default configuration from /etc/masterha/app1.cnf.. Thu Nov 10 23:07:35 2016 - [info] Reading server configuration from /etc/masterha/app1.cnf.. Thu Nov 10 23:07:35 2016 - [info] MHA::MasterMonitor version 0.56. Thu Nov 10 23:07:35 2016 - [info] GTID failover mode = 0 Thu Nov 10 23:07:35 2016 - [info] Dead Servers: Thu Nov 10 23:07:35 2016 - [info] Alive Servers: Thu Nov 10 23:07:35 2016 - [info] node1(192.168.2.201:3306) Thu Nov 10 23:07:35 2016 - [info] node2(192.168.2.202:3306) Thu Nov 10 23:07:35 2016 - [info] node3(192.168.2.203:3306) Thu Nov 10 23:07:35 2016 - [info] Alive Slaves: Thu Nov 10 23:07:35 2016 - [info] node2(192.168.2.202:3306) Version=5.5.50-MariaDB (oldest major version between slaves) log-bin:enabled Thu Nov 10 23:07:35 2016 - [info] Replicating from 192.168.2.201(192.168.2.201:3306) Thu Nov 10 23:07:35 2016 - [info] Primary candidate for the new Master (candidate_master is set) Thu Nov 10 23:07:35 2016 - [info] node3(192.168.2.203:3306) Version=5.5.50-MariaDB (oldest major version between slaves) log-bin:enabled Thu Nov 10 23:07:35 2016 - [info] Replicating from 192.168.2.201(192.168.2.201:3306) Thu Nov 10 23:07:35 2016 - [info] Current Alive Master: node1(192.168.2.201:3306) Thu Nov 10 23:07:35 2016 - [info] Checking slave configurations.. Thu Nov 10 23:07:35 2016 - [warning] relay_log_purge=0 is not set on slave node3(192.168.2.203:3306). Thu Nov 10 23:07:35 2016 - [info] Checking replication filtering settings.. Thu Nov 10 23:07:35 2016 - [info] binlog_do_db= , binlog_ignore_db= Thu Nov 10 23:07:35 2016 - [info] Replication filtering check ok. Thu Nov 10 23:07:35 2016 - [info] GTID (with auto-pos) is not supported Thu Nov 10 23:07:35 2016 - [info] Starting SSH connection tests.. Thu Nov 10 23:07:37 2016 - [info] All SSH connection tests passed successfully. Thu Nov 10 23:07:37 2016 - [info] Checking MHA Node version.. Thu Nov 10 23:07:37 2016 - [info] Version check ok. Thu Nov 10 23:07:37 2016 - [info] Checking SSH publickey authentication settings on the current master.. Thu Nov 10 23:07:37 2016 - [info] HealthCheck: SSH to node1 is reachable. Thu Nov 10 23:07:37 2016 - [info] Master MHA Node version is 0.56. Thu Nov 10 23:07:37 2016 - [info] Checking recovery script configurations on node1(192.168.2.201:3306).. Thu Nov 10 23:07:37 2016 - [info] Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/var/lib/mysql,/var/log/mysql --output_file=/data/masterha/app1/save_binary_logs_test --manager_version=0.56 --start_file=Master-log.000006 Thu Nov 10 23:07:37 2016 - [info] Connecting to root@192.168.2.201(node1:22).. Creating /data/masterha/app1 if not exists.. ok. Checking output directory is accessible or not.. ok. Binlog found at /var/lib/mysql, up to Master-log.000006 Thu Nov 10 23:07:38 2016 - [info] Binlog setting check done. Thu Nov 10 23:07:38 2016 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers.. Thu Nov 10 23:07:38 2016 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=node2 --slave_ip=192.168.2.202 --slave_port=3306 --workdir=/data/masterha/app1 --target_version=5.5.50-MariaDB --manager_version=0.56 --relay_log_info=/var/lib/mysql/relay-log.info --relay_dir=/var/lib/mysql/ --slave_pass=xxx Thu Nov 10 23:07:38 2016 - [info] Connecting to root@192.168.2.202(node2:22).. Checking slave recovery environment settings.. Opening /var/lib/mysql/relay-log.info ... ok. Relay log found at /var/lib/mysql, up to relay-log.000004 Temporary relay log file is /var/lib/mysql/relay-log.000004 Testing mysql connection and privileges.. done. Testing mysqlbinlog output.. done. Cleaning up test file(s).. done. Thu Nov 10 23:07:38 2016 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=node3 --slave_ip=192.168.2.203 --slave_port=3306 --workdir=/data/masterha/app1 --target_version=5.5.50-MariaDB --manager_version=0.56 --relay_log_info=/var/lib/mysql/relay-log.info --relay_dir=/var/lib/mysql/ --slave_pass=xxx Thu Nov 10 23:07:38 2016 - [info] Connecting to root@192.168.2.203(node3:22).. Checking slave recovery environment settings.. Opening /var/lib/mysql/relay-log.info ... ok. Relay log found at /var/lib/mysql, up to relay-log.000002 Temporary relay log file is /var/lib/mysql/relay-log.000002 Testing mysql connection and privileges.. done. Testing mysqlbinlog output.. done. Cleaning up test file(s).. done. Thu Nov 10 23:07:38 2016 - [info] Slaves settings check done. Thu Nov 10 23:07:38 2016 - [info] node1(192.168.2.201:3306) (current master) +--node2(192.168.2.202:3306) +--node3(192.168.2.203:3306) Thu Nov 10 23:07:38 2016 - [info] Checking replication health on node2.. Thu Nov 10 23:07:38 2016 - [info] ok. Thu Nov 10 23:07:38 2016 - [info] Checking replication health on node3.. Thu Nov 10 23:07:38 2016 - [info] ok. Thu Nov 10 23:07:38 2016 - [warning] master_ip_failover_script is not defined. Thu Nov 10 23:07:38 2016 - [warning] shutdown_script is not defined. Thu Nov 10 23:07:38 2016 - [info] Got exit code 0 (Not master dead). MySQL Replication Health is OK.MySQL高可用解决方案:MHA(3)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/34f56d8f140797ef34b5054ae0d4115d.html