- 论坛徽章:
- 0
|
各位网友好,因项目需要搭建mysql 5.6 MHA 在执行 masterha_check_ssh 顺利完成,
但执行masterha_check_repl 检查复制环境时报错
[root@mydb-master-active ~]# masterha_check_repl --conf=/etc/mha/app1.cnf
Thu Jan 11 20:27:58 2018 - [info] Reading default configuration from /etc/masterha_default.cnf..
Thu Jan 11 20:27:58 2018 - [info] Reading application default configuration from /etc/mha/app1.cnf..
Thu Jan 11 20:27:58 2018 - [info] Reading server configuration from /etc/mha/app1.cnf..
Thu Jan 11 20:27:58 2018 - [info] MHA::MasterMonitor version 0.56.
Thu Jan 11 20:27:58 2018 - [info] GTID failover mode = 0
Thu Jan 11 20:27:58 2018 - [info] Dead Servers:
Thu Jan 11 20:27:58 2018 - [info] Alive Servers:
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.101(192.168.1.101:3306)
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.102(192.168.1.102:3306)
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.103(192.168.1.103:3306)
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.104(192.168.1.104:3306)
Thu Jan 11 20:27:58 2018 - [info] Alive Slaves:
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.102(192.168.1.102:3306) Version=5.6.38-log (oldest major version between slaves) log-bin:enabled
Thu Jan 11 20:27:58 2018 - [info] Replicating from 192.168.1.101(192.168.1.101:3306)
Thu Jan 11 20:27:58 2018 - [info] Primary candidate for the new Master (candidate_master is set)
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.103(192.168.1.103:3306) Version=5.6.38-log (oldest major version between slaves) log-bin:enabled
Thu Jan 11 20:27:58 2018 - [info] Replicating from 192.168.1.101(192.168.1.101:3306)
Thu Jan 11 20:27:58 2018 - [info] Primary candidate for the new Master (candidate_master is set)
Thu Jan 11 20:27:58 2018 - [info] 192.168.1.104(192.168.1.104:3306) Version=5.6.38-log (oldest major version between slaves) log-bin:enabled
Thu Jan 11 20:27:58 2018 - [info] Replicating from 192.168.1.101(192.168.1.101:3306)
Thu Jan 11 20:27:58 2018 - [info] Primary candidate for the new Master (candidate_master is set)
Thu Jan 11 20:27:58 2018 - [info] Current Alive Master: 192.168.1.101(192.168.1.101:3306)
Thu Jan 11 20:27:58 2018 - [info] Checking slave configurations..
Thu Jan 11 20:27:58 2018 - [info] read_only=1 is not set on slave 192.168.1.102(192.168.1.102:3306).
Thu Jan 11 20:27:58 2018 - [warning] relay_log_purge=0 is not set on slave 192.168.1.102(192.168.1.102:3306).
Thu Jan 11 20:27:58 2018 - [info] read_only=1 is not set on slave 192.168.1.103(192.168.1.103:3306).
Thu Jan 11 20:27:58 2018 - [warning] relay_log_purge=0 is not set on slave 192.168.1.103(192.168.1.103:3306).
Thu Jan 11 20:27:58 2018 - [info] read_only=1 is not set on slave 192.168.1.104(192.168.1.104:3306).
Thu Jan 11 20:27:58 2018 - [warning] relay_log_purge=0 is not set on slave 192.168.1.104(192.168.1.104:3306).
Thu Jan 11 20:27:58 2018 - [info] Checking replication filtering settings..
Thu Jan 11 20:27:58 2018 - [info] binlog_do_db= , binlog_ignore_db=
Thu Jan 11 20:27:58 2018 - [info] Replication filtering check ok.
Thu Jan 11 20:27:58 2018 - [info] GTID (with auto-pos) is not supported
Thu Jan 11 20:27:58 2018 - [info] Starting SSH connection tests..
Thu Jan 11 20:28:01 2018 - [info] All SSH connection tests passed successfully.
Thu Jan 11 20:28:01 2018 - [info] Checking MHA Node version..
Thu Jan 11 20:28:01 2018 - [info] Version check ok.
Thu Jan 11 20:28:01 2018 - [info] Checking SSH publickey authentication settings on the current master..
Thu Jan 11 20:28:01 2018 - [info] HealthCheck: SSH to 192.168.1.101 is reachable.
Thu Jan 11 20:28:01 2018 - [info] Master MHA Node version is 0.56.
Thu Jan 11 20:28:01 2018 - [info] Checking recovery script configurations on 192.168.1.101(192.168.1.101:3306)..
Thu Jan 11 20:28:01 2018 - [info] Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql/logs/binlog --output_file=/etc/mha/save_binary_logs_test --manager_version=0.56 --start_file=binlog.000006
Thu Jan 11 20:28:01 2018 - [info] Connecting to root@192.168.1.101(192.168.1.101:22)..
Creating /etc/mha if not exists.. ok.
Checking output directory is accessible or not..
ok.
Binlog found at /data/mysql/logs/binlog, up to binlog.000006
Thu Jan 11 20:28:01 2018 - [info] Binlog setting check done.
Thu Jan 11 20:28:01 2018 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Thu Jan 11 20:28:01 2018 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.1.102 --slave_ip=192.168.1.102 --slave_port=3306 --workdir=/etc/mha --target_version=5.6.38-log --manager_version=0.56 --relay_log_info=/data/mysql/logs/relaylog/relay-log.info --relay_dir=/data/mysql/data/ --slave_pass=xxx
Thu Jan 11 20:28:01 2018 - [info] Connecting to root@192.168.1.102(192.168.1.102:22)..
Checking slave recovery environment settings..
Opening /data/mysql/logs/relaylog/relay-log.info ... ok.
Relay log found at /data/mysql/logs/relaylog, up to relaylog.000010
Temporary relay log file is /data/mysql/logs/relaylog/relaylog.000010
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.
Thu Jan 11 20:28:02 2018 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.1.103 --slave_ip=192.168.1.103 --slave_port=3306 --workdir=/etc/mha --target_version=5.6.38-log --manager_version=0.56 --relay_log_info=/data/mysql/logs/relaylog/relay-log.info --relay_dir=/data/mysql/data/ --slave_pass=xxx
Thu Jan 11 20:28:02 2018 - [info] Connecting to root@192.168.1.103(192.168.1.103:22)..
Checking slave recovery environment settings..
Opening /data/mysql/logs/relaylog/relay-log.info ... ok.
Relay log found at /data/mysql/logs/relaylog, up to relaylog.000009
Temporary relay log file is /data/mysql/logs/relaylog/relaylog.000009
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.
Thu Jan 11 20:28:02 2018 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.1.104 --slave_ip=192.168.1.104 --slave_port=3306 --workdir=/etc/mha --target_version=5.6.38-log --manager_version=0.56 --relay_log_info=/data/mysql/logs/relaylog/relay-log.info --relay_dir=/data/mysql/data/ --slave_pass=xxx
Thu Jan 11 20:28:02 2018 - [info] Connecting to root@192.168.1.104(192.168.1.104:22)..
Checking slave recovery environment settings..
Opening /data/mysql/logs/relaylog/relay-log.info ... ok.
Relay log found at /data/mysql/logs/relaylog, up to relaylog.000010
Temporary relay log file is /data/mysql/logs/relaylog/relaylog.000010
Testing mysql connection and privileges..sh: mysql: command not found
mysql command failed with rc 127:0!
at /usr/bin/apply_diff_relay_logs line 375
main::check() called at /usr/bin/apply_diff_relay_logs line 497
eval {...} called at /usr/bin/apply_diff_relay_logs line 475
main::main() called at /usr/bin/apply_diff_relay_logs line 120
Thu Jan 11 20:28:02 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln205] Slaves settings check failed!
Thu Jan 11 20:28:02 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln413] Slave configuration failed.
Thu Jan 11 20:28:02 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/bin/masterha_check_repl line 48
Thu Jan 11 20:28:02 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Thu Jan 11 20:28:02 2018 - [info] Got exit code 1 (Not master dead).
MySQL Replication Health is NOT OK!
搞了好久,一直未解决。请帮助 !!!
|
|