报错信息:
1 [root@server1 bin]# masterha_check_repl --conf=/etc/masterha_default.cnf
2
3 Wed Aug 30 05:04:48 2017 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, ln492] Server 192.168.100.10(192.168.100.10:3306) is dead, but must be alive! Check server settings.
4 Wed Aug 30 05:04:48 2017 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/local/share/perl5/MHA/MasterMonitor.pm line 399
5 Wed Aug 30 05:04:48 2017 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
解决方法:
1 登录192.168.100.10的MySQL。发现MySQL服务是正常,可是为什么会说 192.168.100.10:3306 IS DEAD,可能是防火墙等原因。
2
3 [root@server1 ~]# service iptables stop
4 iptables: Setting chains to policy ACCEPT: filter [ OK ]
5 iptables: Flushing firewall rules: [ OK ]
6 iptables: Unloading modules: [ OK ]
7 关闭防火墙之后,一切正常了。