mysql配置mha高可用防火牆未關閉報錯

來源:互聯網
上載者:User

標籤:防火牆   測試結果   div   binlog   nbsp   shutdown   exit   server   ted   

##########################################################################

l  問題背景:檢查主從複製之後做高可用報錯

[[email protected] oldboy]# masterha_check_repl --conf=/etc/mha/app1.cnf

Thu May  4 21:52:24 2017 - [info] GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.

Thu May  4 21:52:24 2017 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln492]  Server 10.0.0.52(10.0.0.3306) is dead, but must be alive! Check server settings.

Thu May  4 21:52:24 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checkinonfigurations.  at /usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm line 399

Thu May  4 21:52:24 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitor servers.

Thu May  4 21:52:24 2017 - [info] Got exit code 1 (Not master dead).

 

MySQL Replication Health is NOT OK!

########################################################################### 

l  解決思路:

查看部署過程有沒有操作失誤

根據提示Server 10.0.0.52(10.0.0.3306) is dead, but must be alive! Check server settings.判斷10.0.0.52伺服器串連問題

l  查看日誌:

[[email protected] mha]# tail -f /var/log/mha/app1/manager

Thu May  4 17:46:00 2017 - [info] Current Alive Master: 10.0.0.51(10.0.0.51:3306)

Thu May  4 17:46:00 2017 - [info] Checking slave configurations..

Thu May  4 17:46:00 2017 - [info] Checking replication filtering settings..

Thu May  4 17:46:00 2017 - [info]  binlog_do_db= , binlog_ignore_db=

Thu May  4 17:46:00 2017 - [info]  Replication filtering check ok.

Thu May  4 17:46:00 2017 - [info] GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.

Thu May  4 17:46:00 2017 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln492]  Server 10.0.0.52(10.0.0.3306) is dead, but must be alive! Check server settings.

Thu May  4 17:46:00 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checkinonfigurations.  at /usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm line 399

Thu May  4 17:46:00 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitor servers.

Thu May  4 17:46:00 2017 - [info] Got exit code 1 (Not master dead).

############################################################################l 

 

 ############################################################################

l  解決方案:

關閉10.0.0.52防火牆

[[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  ]

測試結果:

Thu May  4 21:52:55 2017 - [info] Checking replication health on 10.0.0.52..

Thu May  4 21:52:55 2017 - [info]  ok.

Thu May  4 21:52:55 2017 - [info] Checking replication health on 10.0.0.53..

Thu May  4 21:52:55 2017 - [info]  ok.

Thu May  4 21:52:55 2017 - [warning] master_ip_failover_script is not defined.

Thu May  4 21:52:55 2017 - [warning] shutdown_script is not defined.

Thu May  4 21:52:55 2017 - [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]#

########################經驗小結###############################

排除故障:

  原因一:防火牆iptables

  原因二:selinux Disabled

  原因三:軟串連

          ln -s /application/mysql/bin/mysqlbinlog /usr/bin/mysqlbinlog

          ln -s /application/mysql/bin/mysql /usr/bin/mysql

######################################################################

mysql配置mha高可用防火牆未關閉報錯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.