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

l  问题背景:检查主从复制之后做高可用报错

[root@db03 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  查看日志:

[root@db03 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防火墙

[root@db02 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).

[root@db03 oldboy]# masterha_check_repl --conf=/etc/mha/app1.cnf

MySQL Replication Health is OK.

[root@db03 oldboy]#

########################经验小结###############################

排除故障:

原因一:防火墙iptables

原因二:selinux Disabled

原因三:软连接

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

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

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

mysql配置mha高可用防火墙未关闭报错的更多相关文章

  1. mysql的MHA高可用

    一.MHA简介 作者简介 松信嘉範: MySQL/Linux专家 2001年索尼公司入职 2001年开始使用oracle 2004年开始使用MySQL 2006年9月-2010年8月MySQL从事顾问 ...

  2. spring boot thymeleaf 标签未关闭报错

    每天学习一点点 编程PDF电子书免费下载: http://www.shitanlife.com/code spring boot,input标签未关闭报bug,代码稍有不慎就出小问题,后来百度,goo ...

  3. MySQL 部署 MHA 高可用架构 (一)

    MHA 官方网址 Manager : https://github.com/yoshinorim/mha4mysql-manager Node : https://github.com/yoshino ...

  4. MySQL 部署 MHA 高可用架构 (二)

    实现 MHA VIP 功能 配置 master_ip_failover 脚本(db3) 把 master_ip_failover 上传到 /iba/software 上 master_ip_failo ...

  5. MySQL MHA 高可用集群部署及故障切换

    MySQL MHA 高可用集群部署及故障切换 1.概念 2.搭建MySQL + MHA 1.概念: a)MHA概念 : MHA(MasterHigh Availability)是一套优秀的MySQL高 ...

  6. MySQL系列:高可用架构之MHA

    前言 从11年毕业到现在,工作也好些年头,入坑mysql也有近四年的时间,也捣鼓过像mongodb.redis.cassandra.neo4j等Nosql数据库.其实一直想写博客分享下工作上的零零碎碎 ...

  7. Mysql MHA高可用集群架构

    ** 记得之前发过一篇文章,名字叫<浅析MySQL高可用架构>,之后一直有很多小伙伴在公众号后台或其它渠道问我,何时有相关的深入配置管理文章出来,因此,民工哥,也将对前面的各类架构逐一进行 ...

  8. mysql mha高可用架构的安装

    MMM无法全然地保证数据的一致性,所以MMM适用于对数据的一致性要求不是非常高.可是又想最大程度的保证业务可用性的场景对于那些对数据一致性要求非常高的业务,非常不建议採用MMM的这样的高可用性架构.那 ...

  9. 【MySQL】MMM和MHA高可用架构

    用途 对MySQL主从复制集群的Master的健康监控. 当Master宕机后把写VIP迁移到新Master. 重新配置集群中的其他Slave从新Master同步 MMM架构 主服务器发生故障时, 1 ...

随机推荐

  1. hi3531 SDK已编译文件系统制作jffs2文件系统镜像并解决这个问题 .

    一, 安装SDK 1.Hi3531 SDK包位置 在"Hi3531_V100R001***/01.software/board"文件夹下,您能够看到一个 Hi3531_SDK_Vx ...

  2. 五分钟搭建 Flash 视频直播站

    想在家里对全世界直播网络视频节目吗?如今视频网站是多如牛毛,但能让你玩直播的估计没几个吧?看完这篇教程就能帮你实现网络主持人的梦想.不花钱,不懂编程,不用写代码也行哦~ 首先是最低机器要求:Windo ...

  3. icvSetWeightsAndClasses

    /* *icvSetWeightsAndClasses *作用:给训练样本的权重和类别赋值 */ static void icvSetWeightsAndClasses( CvHaarTraining ...

  4. 学习Opencv 2.4.9 (一)---Opencv + vs2012环境配置

    作者:咕唧咕唧liukun321 来自:http://blog.csdn.net/liukun321 首先获得最新的Opencv 2.4.9源代码:opencv源代码下载 一.Opencv环境变量配置 ...

  5. The type java.lang.reflect.AnnotatedElement cannot be resolved. It is indirectly referenced from required .class files

    我这个错误发生于导入项目的时候..我发现主要是jdk版本的问题.切换一下jdk.直接红叉消失就可以了.....jdk版本一致性还是很重要的

  6. Email格式验证

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <html ...

  7. Linux进程间通信——使用信号量【转】

    本文转载自:http://blog.csdn.net/ljianhui/article/details/10243617 这篇文章将讲述别一种进程间通信的机制——信号量.注意请不要把它与之前所说的信号 ...

  8. bzoj2823: [AHOI2012]信号塔&&1336: [Balkan2002]Alien最小圆覆盖&&1337: 最小圆覆盖

    首先我写了个凸包就溜了 这是最小圆覆盖问题,今晚学了一下 先随机化点,一个个加入 假设当前圆心为o,半径为r,加入的点为i 若i不在圆里面,令圆心为i,半径为0 再重新从1~i-1不停找j不在圆里面, ...

  9. HDU3829 Cat VS Dog —— 最大独立集

    题目链接:https://vjudge.net/problem/HDU-3829 Cat VS Dog Time Limit: 2000/1000 MS (Java/Others)    Memory ...

  10. HDU1024 Max Sum Plus Plus —— DP + 滚动数组

    题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1024 Max Sum Plus Plus Time Limit: 2000/1000 MS ...