Can‘t exec “mysqlbinlog“: No such file or directory BinlogManager.pm line 106.

Can't exec "mysqlbinlog": No such file or directory at /usr/share/perl5/vendor_perl/MHA/BinlogManager.pm line 106.

[root@mha-m mha_master]# masterha_check_repl -conf=/etc/mha_master/mha.cnf

Thu Nov 12 20:28:51 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Thu Nov 12 20:28:51 2020 - [info] Reading application default configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:28:51 2020 - [info] Reading server configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:28:51 2020 - [info] MHA::MasterMonitor version 0.58.
Thu Nov 12 20:28:52 2020 - [info] GTID failover mode = 0
Thu Nov 12 20:28:52 2020 - [info] Dead Servers:
Thu Nov 12 20:28:52 2020 - [info] Alive Servers:
Thu Nov 12 20:28:52 2020 - [info]   192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:28:52 2020 - [info]   192.168.10.12(192.168.10.12:3306)
Thu Nov 12 20:28:52 2020 - [info]   192.168.10.13(192.168.10.13:3306)
Thu Nov 12 20:28:52 2020 - [info] Alive Slaves:
Thu Nov 12 20:28:52 2020 - [info]   192.168.10.12(192.168.10.12:3306)  Version=5.7.31-log (oldest major version between slaves) log-bin:enabled
Thu Nov 12 20:28:52 2020 - [info]     Replicating from 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:28:52 2020 - [info]     Primary candidate for the new Master (candidate_master is set)
Thu Nov 12 20:28:52 2020 - [info]   192.168.10.13(192.168.10.13:3306)  Version=5.7.31 (oldest major version between slaves) log-bin:disabled
Thu Nov 12 20:28:52 2020 - [info]     Replicating from 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:28:52 2020 - [info]     Primary candidate for the new Master (candidate_master is set)
Thu Nov 12 20:28:52 2020 - [info] Current Alive Master: 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:28:52 2020 - [info] Checking slave configurations..
Thu Nov 12 20:28:52 2020 - [warning]  relay_log_purge=0 is not set on slave 192.168.10.12(192.168.10.12:3306).
Thu Nov 12 20:28:52 2020 - [warning]  relay_log_purge=0 is not set on slave 192.168.10.13(192.168.10.13:3306).
Thu Nov 12 20:28:52 2020 - [warning]  log-bin is not set on slave 192.168.10.13(192.168.10.13:3306). This host cannot be a master.
Thu Nov 12 20:28:52 2020 - [info] Checking replication filtering settings..
Thu Nov 12 20:28:52 2020 - [info]  binlog_do_db= , binlog_ignore_db= 
Thu Nov 12 20:28:52 2020 - [info]  Replication filtering check ok.
Thu Nov 12 20:28:52 2020 - [info] GTID (with auto-pos) is not supported
Thu Nov 12 20:28:52 2020 - [info] Starting SSH connection tests..
Thu Nov 12 20:28:55 2020 - [info] All SSH connection tests passed successfully.
Thu Nov 12 20:28:55 2020 - [info] Checking MHA Node version..
Thu Nov 12 20:28:55 2020 - [info]  Version check ok.
Thu Nov 12 20:28:55 2020 - [info] Checking SSH publickey authentication settings on the current master..
Thu Nov 12 20:28:55 2020 - [info] HealthCheck: SSH to 192.168.10.11 is reachable.
Thu Nov 12 20:28:56 2020 - [info] Master MHA Node version is 0.58.
Thu Nov 12 20:28:56 2020 - [info] Checking recovery script configurations on 192.168.10.11(192.168.10.11:3306)..
Thu Nov 12 20:28:56 2020 - [info]   Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/mysql/binlog --output_file=/mydata/mha_master/app1/save_binary_logs_test --manager_version=0.58 --start_file=mysql-bin.000014 
Thu Nov 12 20:28:56 2020 - [info]   Connecting to root@192.168.10.11(192.168.10.11:22).. 
  Creating /mydata/mha_master/app1 if not exists.. Creating directory /mydata/mha_master/app1.. done.
   ok.
  Checking output directory is accessible or not..
   ok.
  Binlog found at /mysql/binlog, up to mysql-bin.000014
Thu Nov 12 20:28:56 2020 - [info] Binlog setting check done.
Thu Nov 12 20:28:56 2020 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Thu Nov 12 20:28:56 2020 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='mhaadmin' --slave_host=192.168.10.12 --slave_ip=192.168.10.12 --slave_port=3306 --workdir=/mydata/mha_master/app1 --target_version=5.7.31-log --manager_version=0.58 --relay_dir=/mysql/data --current_relay_log=mysql-slave01-relay-bin.000023  --slave_pass=xxx
Thu Nov 12 20:28:56 2020 - [info]   Connecting to root@192.168.10.12(192.168.10.12: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 532.
Thu Nov 12 20:28:56 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln208] Slaves settings check failed!
Thu Nov 12 20:28:56 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln416] Slave configuration failed.
Thu Nov 12 20:28:56 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations.  at /usr/bin/masterha_check_repl line 48.
Thu Nov 12 20:28:56 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.
Thu Nov 12 20:28:56 2020 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!



所有节点执行 ln -s binlog软链接

[root@mysql57-m ~]#  ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
[root@mysql57-m ~]#  ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql


[root@mysql-slave01 ~]# ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
[root@mysql-slave01 ~]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql

[root@mysql-slave02 ~]# ln -s /usr/local/mysql/bin/mysqlbinlog /usr/local/bin/mysqlbinlog
[root@mysql-slave02 ~]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql



再次运行,没有报错

[root@mha-m mha_master]# masterha_check_repl -conf=/etc/mha_master/mha.cnf
Thu Nov 12 20:36:45 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Thu Nov 12 20:36:45 2020 - [info] Reading application default configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:36:45 2020 - [info] Reading server configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:36:45 2020 - [info] MHA::MasterMonitor version 0.58.
Thu Nov 12 20:36:47 2020 - [info] GTID failover mode = 0
Thu Nov 12 20:36:47 2020 - [info] Dead Servers:
Thu Nov 12 20:36:47 2020 - [info] Alive Servers:
Thu Nov 12 20:36:47 2020 - [info]   192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:36:47 2020 - [info]   192.168.10.12(192.168.10.12:3306)
Thu Nov 12 20:36:47 2020 - [info]   192.168.10.13(192.168.10.13:3306)
Thu Nov 12 20:36:47 2020 - [info] Alive Slaves:
Thu Nov 12 20:36:47 2020 - [info]   192.168.10.12(192.168.10.12:3306)  Version=5.7.31-log (oldest major version between slaves) log-bin:enabled
Thu Nov 12 20:36:47 2020 - [info]     Replicating from 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:36:47 2020 - [info]     Primary candidate for the new Master (candidate_master is set)
Thu Nov 12 20:36:47 2020 - [info]   192.168.10.13(192.168.10.13:3306)  Version=5.7.31 (oldest major version between slaves) log-bin:disabled
Thu Nov 12 20:36:47 2020 - [info]     Replicating from 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:36:47 2020 - [info]     Primary candidate for the new Master (candidate_master is set)
Thu Nov 12 20:36:47 2020 - [info] Current Alive Master: 192.168.10.11(192.168.10.11:3306)
Thu Nov 12 20:36:47 2020 - [info] Checking slave configurations..
Thu Nov 12 20:36:47 2020 - [warning]  relay_log_purge=0 is not set on slave 192.168.10.12(192.168.10.12:3306).
Thu Nov 12 20:36:47 2020 - [warning]  relay_log_purge=0 is not set on slave 192.168.10.13(192.168.10.13:3306).
Thu Nov 12 20:36:47 2020 - [warning]  log-bin is not set on slave 192.168.10.13(192.168.10.13:3306). This host cannot be a master.
Thu Nov 12 20:36:47 2020 - [info] Checking replication filtering settings..
Thu Nov 12 20:36:47 2020 - [info]  binlog_do_db= , binlog_ignore_db= 
Thu Nov 12 20:36:47 2020 - [info]  Replication filtering check ok.
Thu Nov 12 20:36:47 2020 - [info] GTID (with auto-pos) is not supported
Thu Nov 12 20:36:47 2020 - [info] Starting SSH connection tests..
Thu Nov 12 20:36:49 2020 - [info] All SSH connection tests passed successfully.
Thu Nov 12 20:36:49 2020 - [info] Checking MHA Node version..
Thu Nov 12 20:36:50 2020 - [info]  Version check ok.
Thu Nov 12 20:36:50 2020 - [info] Checking SSH publickey authentication settings on the current master..
Thu Nov 12 20:36:50 2020 - [info] HealthCheck: SSH to 192.168.10.11 is reachable.
Thu Nov 12 20:36:50 2020 - [info] Master MHA Node version is 0.58.
Thu Nov 12 20:36:50 2020 - [info] Checking recovery script configurations on 192.168.10.11(192.168.10.11:3306)..
Thu Nov 12 20:36:50 2020 - [info]   Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/mysql/binlog --output_file=/mydata/mha_master/app1/save_binary_logs_test --manager_version=0.58 --start_file=mysql-bin.000014 
Thu Nov 12 20:36:50 2020 - [info]   Connecting to root@192.168.10.11(192.168.10.11:22).. 
  Creating /mydata/mha_master/app1 if not exists..    ok.
  Checking output directory is accessible or not..
   ok.
  Binlog found at /mysql/binlog, up to mysql-bin.000014
Thu Nov 12 20:36:50 2020 - [info] Binlog setting check done.
Thu Nov 12 20:36:50 2020 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Thu Nov 12 20:36:50 2020 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='mhaadmin' --slave_host=192.168.10.12 --slave_ip=192.168.10.12 --slave_port=3306 --workdir=/mydata/mha_master/app1 --target_version=5.7.31-log --manager_version=0.58 --relay_dir=/mysql/data --current_relay_log=mysql-slave01-relay-bin.000023  --slave_pass=xxx
Thu Nov 12 20:36:50 2020 - [info]   Connecting to root@192.168.10.12(192.168.10.12:22).. 
Creating directory /mydata/mha_master/app1.. done.
  Checking slave recovery environment settings..
    Relay log found at /mysql/data, up to mysql-slave01-relay-bin.000024
    Temporary relay log file is /mysql/data/mysql-slave01-relay-bin.000024
    Checking if super_read_only is defined and turned on.. not present or turned off, ignoring.
    Testing mysql connection and privileges..
mysql: [Warning] Using a password on the command line interface can be insecure.
 done.
    Testing mysqlbinlog output.. done.
    Cleaning up test file(s).. done.
Thu Nov 12 20:36:51 2020 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='mhaadmin' --slave_host=192.168.10.13 --slave_ip=192.168.10.13 --slave_port=3306 --workdir=/mydata/mha_master/app1 --target_version=5.7.31 --manager_version=0.58 --relay_dir=/mysql/log --current_relay_log=mysqls01-relay-bin.000023  --slave_pass=xxx
Thu Nov 12 20:36:51 2020 - [info]   Connecting to root@192.168.10.13(192.168.10.13:22).. 
Creating directory /mydata/mha_master/app1.. done.
  Checking slave recovery environment settings..
    Relay log found at /mysql/log, up to mysqls01-relay-bin.000024
    Temporary relay log file is /mysql/log/mysqls01-relay-bin.000024
    Checking if super_read_only is defined and turned on.. not present or turned off, ignoring.
    Testing mysql connection and privileges..
mysql: [Warning] Using a password on the command line interface can be insecure.
 done.
    Testing mysqlbinlog output.. done.
    Cleaning up test file(s).. done.
Thu Nov 12 20:36:51 2020 - [info] Slaves settings check done.
Thu Nov 12 20:36:51 2020 - [info] 
192.168.10.11(192.168.10.11:3306) (current master)
 +--192.168.10.12(192.168.10.12:3306)
 +--192.168.10.13(192.168.10.13:3306)

Thu Nov 12 20:36:51 2020 - [info] Checking replication health on 192.168.10.12..
Thu Nov 12 20:36:51 2020 - [info]  ok.
Thu Nov 12 20:36:51 2020 - [info] Checking replication health on 192.168.10.13..
Thu Nov 12 20:36:51 2020 - [info]  ok.
Thu Nov 12 20:36:51 2020 - [warning] master_ip_failover_script is not defined.
Thu Nov 12 20:36:51 2020 - [warning] shutdown_script is not defined.
Thu Nov 12 20:36:51 2020 - [info] Got exit code 0 (Not master dead).

MySQL Replication Health is OK.

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值