##########################################################################
L Problem background: Check the master-slave copy to do high-availability error
[Email protected] oldboy]# MASTERHA_CHECK_REPL--conf=/etc/mha/app1.cnf
Thu 4 21:52:24-[info] GTID (with Auto-pos) is supported. Skipping all SSH and Node package checking.
Thu May 4 21:52:24-[error][/usr/share/perl5/vendor_perl/mha/servermanager.pm, ln492] Server 10.0.0.52 (10.0.0.330 6) is dead, but must be alive! Check server settings.
Thu 4 21:52:24-[error][/usr/share/perl5/vendor_perl/mha/mastermonitor.pm, ln424] error happened on CHECKINONFI Gurations. AT/USR/SHARE/PERL5/VENDOR_PERL/MHA/MASTERMONITOR.PM Line 399
Thu 4 21:52:24-[error][/usr/share/perl5/vendor_perl/mha/mastermonitor.pm, ln523] error happened on monitor Ser Vers.
Thu 4 21:52:24-[INFO] Got exit code 1 (not master dead).
MySQL Replication Health is not ok!
###########################################################################
L Solution Ideas:
See if the deployment process is faulty
According to the prompt server 10.0.0.52 (10.0.0.3306) is dead, but must be alive! Check server settings. Determine 10.0.0.52 server connectivity issues
L View Log:
[Email protected] mha]# tail-f/var/log/mha/app1/manager
Thu 4 17:46:00-[INFO] current Alive master:10.0.0.51 (10.0.0.51:3306)
Thu May 4 17:46:00-[info] Checking slave configurations.
Thu May 4 17:46:00-[INFO] Checking replication filtering settings.
Thu May 4 17:46:00-[info] binlog_do_db=, binlog_ignore_db=
Thu May 4 17:46:00-[info] Replication filtering check OK.
Thu 4 17:46:00-[info] GTID (with Auto-pos) is supported. Skipping all SSH and Node package checking.
Thu May 4 17:46:00-[error][/usr/share/perl5/vendor_perl/mha/servermanager.pm, ln492] Server 10.0.0.52 (10.0.0.330 6) is dead, but must be alive! Check server settings.
Thu 4 17:46:00-[error][/usr/share/perl5/vendor_perl/mha/mastermonitor.pm, ln424] error happened on CHECKINONFI Gurations. AT/USR/SHARE/PERL5/VENDOR_PERL/MHA/MASTERMONITOR.PM Line 399
Thu 4 17:46:00-[error][/usr/share/perl5/vendor_perl/mha/mastermonitor.pm, ln523] error happened on monitor Ser Vers.
Thu 4 17:46:00-[INFO] Got exit code 1 (not master dead).
########################################################################### #l
############################################################################
L Workaround:
Close 10.0.0.52 Firewall
[[email protected] mha]#/etc/init.d/iptables stop
Iptables:setting chains to Policy Accept:filter [OK]
iptables:flushing firewall rules: [OK]
iptables:unloading modules: [OK]
Test results:
Thu 4 21:52:55-[INFO] Checking replication Health on 10.0.0.52.
Thu May 4 21:52:55-[info] OK.
Thu 4 21:52:55-[INFO] Checking replication Health on 10.0.0.53.
Thu May 4 21:52:55-[info] OK.
Thu 4 21:52:55-[WARNING] master_ip_failover_script is not defined.
Thu 4 21:52:55-[WARNING] shutdown_script is not defined.
Thu 4 21:52:55-[INFO] Got exit code 0 (not master dead).
[Email protected] oldboy]# MASTERHA_CHECK_REPL--conf=/etc/mha/app1.cnf
MySQL Replication Health is OK.
[Email protected] oldboy]#
####################### #经验小结 ###############################
Troubleshooting:
Reason one: Firewall iptables
Reason two: SELinux Disabled
Reason three: Soft connection
Ln-s/application/mysql/bin/mysqlbinlog/usr/bin/mysqlbinlog
Ln-s/application/mysql/bin/mysql/usr/bin/mysql
######################################################################
MySQL configuration MHA High availability firewall not turned off error