MySQL MHA 搭建一直报找不到binlog目录,但实际上这个目录已经创建好的了。

masterha_check_repl --conf=/etc/masterha/app1.cnf
Sat Aug 14 16:47:23 2021 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sat Aug 14 16:47:23 2021 - [info] Reading application default configurations from /etc/masterha/app1.cnf..
Sat Aug 14 16:47:23 2021 - [info] Reading server configurations from /etc/masterha/app1.cnf..
Sat Aug 14 16:47:23 2021 - [info] MHA::MasterMonitor version 0.53.
Sat Aug 14 16:47:25 2021 - [info] Dead Servers:
Sat Aug 14 16:47:25 2021 - [info] Alive Servers:
Sat Aug 14 16:47:25 2021 - [info]   192.168.3.15(192.168.3.15:3306)
Sat Aug 14 16:47:25 2021 - [info]   192.168.3.17(192.168.3.17:3306)
Sat Aug 14 16:47:25 2021 - [info]   192.168.3.18(192.168.3.18:3306)
Sat Aug 14 16:47:25 2021 - [info] Alive Slaves:
Sat Aug 14 16:47:25 2021 - [info]   192.168.3.17(192.168.3.17:3306)  Version=5.7.35-log (oldest major version between slaves) log-bin:enabled
Sat Aug 14 16:47:25 2021 - [info]     Replicating from 192.168.3.15(192.168.3.15:3306)
Sat Aug 14 16:47:25 2021 - [info]   192.168.3.18(192.168.3.18:3306)  Version=5.7.35-log (oldest major version between slaves) log-bin:enabled
Sat Aug 14 16:47:25 2021 - [info]     Replicating from 192.168.3.15(192.168.3.15:3306)
Sat Aug 14 16:47:25 2021 - [info] Current Alive Master: 192.168.3.15(192.168.3.15:3306)
Sat Aug 14 16:47:25 2021 - [info] Checking slave configurations..
Sat Aug 14 16:47:25 2021 - [info]  read_only=1 is not set on slave 192.168.3.18(192.168.3.18:3306).
Sat Aug 14 16:47:25 2021 - [warning]  relay_log_purge=0 is not set on slave 192.168.3.18(192.168.3.18:3306).
Sat Aug 14 16:47:25 2021 - [info] Checking replication filtering settings..
Sat Aug 14 16:47:25 2021 - [info]  binlog_do_db= HA, binlog_ignore_db= mysql
Sat Aug 14 16:47:25 2021 - [info]  Replication filtering check ok.
Sat Aug 14 16:47:25 2021 - [info] Starting SSH connection tests..
Sat Aug 14 16:47:28 2021 - [info] All SSH connection tests passed successfully.
Sat Aug 14 16:47:28 2021 - [info] Checking MHA Node version..
Sat Aug 14 16:47:29 2021 - [info]  Version check ok.
Sat Aug 14 16:47:29 2021 - [info] Checking SSH publickey authentication settings on the current master..
Sat Aug 14 16:47:30 2021 - [info] HealthCheck: SSH to 192.168.3.15 is reachable.
Sat Aug 14 16:47:30 2021 - [info] Master MHA Node version is 0.53.
Sat Aug 14 16:47:30 2021 - [info] Checking recovery script configurations on the current master..
Sat Aug 14 16:47:30 2021 - [info]   Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql/ --output_file=/tminary_logs_test --manager_version=0.53 --start_file=mysql-bin-master.000002 
Sat Aug 14 16:47:30 2021 - [info]   Connecting to root@192.168.3.15(192.168.3.15).. 
Failed to save binary log: Binlog not found from /data/mysql/! If you got this error at MHA Manager, please set "master_binlog_dir=/path/to/binltory_of_the_master" correctly in the MHA Manager's configuration file and try again.
 at /usr/bin/save_binary_logs line 117.
    eval {...} called at /usr/bin/save_binary_logs line 66
    main::main() called at /usr/bin/save_binary_logs line 62
Sat Aug 14 16:47:31 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln152] Master setting check failed!
Sat Aug 14 16:47:31 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln364] Master configuration failed.
Sat Aug 14 16:47:31 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln383] Error happend on checking configurations.  at /usr/erha_check_repl line 48.
Sat Aug 14 16:47:31 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln478] Error happened on monitoring servers.
Sat Aug 14 16:47:31 2021 - [info] Got exit code 1 (Not master dead).



192.168.3.15

[root@ms3 ~]# ls /data/mysql/
mysqlbinlog
[root@ms3 ~]# 

img

你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


​​因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。