1,Can't exec "mysqlbinlog": No such file or directory at /usr/share/perl5/vendor_perl/MHA/BinlogManager.pm line 106.
[root@node4 ~]# masterha_check_repl --conf=/masterha_work/conf/mha_total.cnf
....省略若干....
......
Fri Oct 6 13:14:15 2017 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Fri Oct 6 13:14:15 2017 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='mhauser' --slave_host=192.168.56.27 --slave_ip=192.168.56.27 --slave_port=3307 --workdir=/masterha_work/rmt_mysql_binlog_workdir --target_version=5.6.34-log --manager_version=0.56 --relay_log_info=/data/mysql/3307/data/relay-log.info --relay_dir=/data/mysql/3307/data/ --slave_pass=xxx
Fri Oct 6 13:14:15 2017 - [info] Connecting to root@192.168.56.27(192.168.56.27:22)..
Can't exec "mysqlbinlog": No such file or directory at /usr/share/perl5/vendor_perl/MHA/BinlogManager.pm line 106.
mysqlbinlog version command failed with rc 1:0, please verify PATH, LD_LIBRARY_PATH, and client options
at /usr/bin/apply_diff_relay_logs line 493
Fri Oct 6 13:14:15 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln205] Slaves settings check failed!
Fri Oct 6 13:14:15 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln413] Slave configuration failed.
Fri Oct 6 13:14:15 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/bin/masterha_check_repl line 48
Fri Oct 6 13:14:15 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Fri Oct 6 13:14:15 2017 - [info] Got exit code 1 (Not master dead).
解决办法: (所有节点)
[root@node2 ~]# which mysqlbinlog
/usr/local/mysql/bin/mysqlbinlog
[root@node2 ~]# ln -s /usr/local/mysql/bin/mysqlbinlog /usr/bin/mysqlbinlog
[root@node2 ~]# which mysql
/usr/local/mysql/bin/mysql
[root@node2 ~]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
2,User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host.
[root@node4 ~]# masterha_check_repl --conf=/masterha_work/conf/mha_total.cnf
....省略若干....
......
Fri Oct 6 13:11:05 2017 - [error][/usr/share/perl5/vendor_perl/MHA/Server.pm, ln393] 192.168.56.27(192.168.56.27:3307): User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host.
Fri Oct 6 13:11:05 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/share/perl5/vendor_perl/MHA/ServerManager.pm line 1403
Fri Oct 6 13:11:05 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Fri Oct 6 13:11:05 2017 - [info] Got exit code 1 (Not master dead).
MySQL Replication Health is NOT OK!
解决办法:
从库也创建repl用户。???此处有疑问。
3,Testing mysql connection and privileges..sh: mysql: command not found
[root@node4 ~]# masterha_check_repl --conf=/masterha_work/conf/mha_total.cnf
....省略若干....
......
Fri Oct 6 13:18:14 2017 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='mhauser' --slave_host=192.168.56.27 --slave_ip=192.168.56.27 --slave_port=3307 --workdir=/masterha_work/rmt_mysql_binlog_workdir --target_version=5.6.34-log --manager_version=0.56 --relay_log_info=/data/mysql/3307/data/relay-log.info --relay_dir=/data/mysql/3307/data/ --slave_pass=xxx
Fri Oct 6 13:18:14 2017 - [info] Connecting to root@192.168.56.27(192.168.56.27:22)..
Checking slave recovery environment settings..
Opening /data/mysql/3307/data/relay-log.info ... ok.
Relay log found at /data/mysql/3307/data, up to relay-bin.000002
Temporary relay log file is /data/mysql/3307/data/relay-bin.000002
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
Fri Oct 6 13:18:14 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln205] Slaves settings check failed!
Fri Oct 6 13:18:14 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln413] Slave configuration failed.
Fri Oct 6 13:18:14 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/bin/masterha_check_repl line 48
Fri Oct 6 13:18:14 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Fri Oct 6 13:18:14 2017 - [info] Got exit code 1 (Not master dead).
解决办法:
[root@node2 ~]# which mysql
/usr/local/mysql/bin/mysql
[root@node2 ~]# ln -s /usr/local
解决办法: (所有节点)
[root@node2 ~]# which mysqlbinlog
/usr/local/mysql/bin/mysqlbinlog
[root@node2 ~]# ln -s /usr/local/mysql/bin/mysqlbinlog /usr/bin/mysqlbinlog
[root@node2 ~]# which mysql
/usr/local/mysql/bin/mysql
[root@node2 ~]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
/mysql/bin/mysql /usr/bin/mysql
4,Sun Mar 12 23:25:56 2017 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln301] Got MySQL error when connecting 192.168.56.27(192.168.56.27:3306) :1045:Access denied for user 'myha'@'node2' (using password: YES), but this is not a MySQL crash. Check MySQL server settings.