博客
关于我
mha常见的一些报错
阅读量:196 次
发布时间:2019-02-28

本文共 7090 字,大约阅读时间需要 23 分钟。

mha常见的报错

安装manger节点是需要安装依赖包,如果根据报错提示缺少的包名单独下载,安装失败的可能性比较大(教训总结)

错误1:

root@localhost ~]# yum -y install mha4mysql-manager-0.58-0.el7.centos.noarch.rpmLoaded plugins: fastestmirrorRepository base is listed more than once in the configurationRepository updates is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository centosplus is listed more than once in the configurationExamining mha4mysql-manager-0.58-0.el7.centos.noarch.rpm: mha4mysql-manager-0.58-0.el7.centos.noarchMarking mha4mysql-manager-0.58-0.el7.centos.noarch.rpm to be installedResolving Dependencies--> Running transaction check---> Package mha4mysql-manager.noarch 0:0.58-0.el7.centos will be installed--> Processing Dependency: perl(Log::Dispatch) for package: mha4mysql-manager-0.58-0.el7.centos.noarchLoading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirror.bit.edu.cn * updates: mirror.bit.edu.cn--> Processing Dependency: perl(Log::Dispatch) for package: mha4mysql-manager-0.58-0.el7.centos.noarch--> Processing Dependency: perl(Log::Dispatch::File) for package: mha4mysql-manager-0.58-0.el7.centos.noarch--> Processing Dependency: perl(Log::Dispatch::Screen) for package: mha4mysql-manager-0.58-0.el7.centos.noarch--> Finished Dependency ResolutionError: Package: mha4mysql-manager-0.58-0.el7.centos.noarch (/mha4mysql-manager-0.58-0.el7.centos.noarch)           Requires: perl(Log::Dispatch)Error: Package: mha4mysql-manager-0.58-0.el7.centos.noarch (/mha4mysql-manager-0.58-0.el7.centos.noarch)           Requires: perl(Log::Dispatch::File)Error: Package: mha4mysql-manager-0.58-0.el7.centos.noarch (/mha4mysql-manager-0.58-0.el7.centos.noarch)           Requires: perl(Log::Dispatch::Screen) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

[

解决:

1、Download the latest epel-release rpm from 下载安装yum源
http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
2、Install epel-release rpm:
rpm -Uvh epel-release*rpm
3、Install perl-Log-Dispatch rpm package:
yum install mha4mysql-manager-0.58-0.el7.centos.noarch.rpm -y
此方法使用所有perl依赖包报错。:
1、安装
yum -y install mha4mysql-node-0.58-0.el7.centos.noarch.rpm
yum -y install mha4mysql-manager-0.58-0.el7.centos.noarch.rpm

错误2:

[root@master mha4mysql]# masterha_check_ssh  --conf=/etc/mha4mysql/app1.cnfFri Mar 30 17:49:06 2018 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.Fri Mar 30 17:49:06 2018 - [info] Reading application default configuration from /etc/mha4mysql/app1.cnf..Parameter ping_interval must be positive integer! current value: 1         #设置监控主库,发送ping包的时间间隔,默认是3秒,尝试三次没有回应的时候自动进行railover at /usr/share/perl5/vendor_perl/MHA/SSHCheck.pm line 148.

解决

/etc/mha4mysql/app1.cnf文件参数后面不能有空格

错误3:

[root@master ~]# masterha_check_ssh  --conf=/etc/mha4mysql/app1.cnfFri Mar 30 18:28:28 2018 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.Fri Mar 30 18:28:28 2018 - [info] Reading application default configuration from /etc/mha4mysql/app1.cnf..Fri Mar 30 18:28:28 2018 - [info] Reading server configuration from /etc/mha4mysql/app1.cnf..Fri Mar 30 18:28:28 2018 - [info] Starting SSH connection tests..Fri Mar 30 18:28:28 2018 - [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63]Fri Mar 30 18:28:28 2018 - [debug]  Connecting via SSH from root@192.168.31.16(192.168.31.16:22) to root@192.168.31.118(192.168.31.118:22)..Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).Fri Mar 30 18:28:28 2018 - [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln111] SSH connection from root@192.168.31.16(192.168.31.16:22) to root@192.168.31.118(192.168.31.118:22) failed!Fri Mar 30 18:28:29 2018 - [debug]Fri Mar 30 18:28:28 2018 - [debug]  Connecting via SSH from root@192.168.31.118(192.168.31.118:22) to root@192.168.31.16(192.168.31.16:22)..Fri Mar 30 18:28:29 2018 - [debug]   ok.Fri Mar 30 18:28:29 2018 - [debug]  Connecting via SSH from root@192.168.31.118(192.168.31.118:22) to root@192.168.31.2(192.168.31.2:22)..Fri Mar 30 18:28:29 2018 - [debug]   ok.Fri Mar 30 18:28:30 2018 - [debug]Fri Mar 30 18:28:29 2018 - [debug]  Connecting via SSH from root@192.168.31.2(192.168.31.2:22) to root@192.168.31.16(192.168.31.16:22)..Fri Mar 30 18:28:29 2018 - [debug]   ok.Fri Mar 30 18:28:29 2018 - [debug]  Connecting via SSH from root@192.168.31.2(192.168.31.2:22) to root@192.168.31.118(192.168.31.118:22)..Fri Mar 30 18:28:30 2018 - [debug]   ok.SSH Configuration Check Failed! at /usr/bin/masterha_check_ssh line 44.[root@master ~]# ssh masterroot@master's password:Permission denied, please try again.root@master's password:Permission denied, please try again.root@master's password:Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).[root@master ~]#[root@master ~]# vim /etc/mha4mysql/app1.cnf[root@master ~]# masterha_check_ssh  --conf=/etc/mha4mysql/app1.cnfFri Mar 30 18:41:21 2018 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.Fri Mar 30 18:41:21 2018 - [info] Reading application default configuration from /etc/mha4mysql/app1.cnf..Fri Mar 30 18:41:21 2018 - [info] Reading server configuration from /etc/mha4mysql/app1.cnf..Fri Mar 30 18:41:21 2018 - [info] Starting SSH connection tests..Fri Mar 30 18:41:22 2018 - [debug]Fri Mar 30 18:41:21 2018 - [debug]  Connecting via SSH from root@192.168.31.118(192.168.31.118:22) to root@192.168.31.2(192.168.31.2:22)..Fri Mar 30 18:41:22 2018 - [debug]   ok.Fri Mar 30 18:41:22 2018 - [debug]Fri Mar 30 18:41:22 2018 - [debug]  Connecting via SSH from root@192.168.31.2(192.168.31.2:22) to root@192.168.31.118(192.168.31.118:22)..Fri Mar 30 18:41:22 2018 - [debug]   ok.Fri Mar 30 18:41:22 2018 - [info] All SSH connection tests passed successfully.

解决方法:

/etc/mha4mysql/app1.cnf
注释掉manager管理节点

错误4:

[root@localhost ~]# masterha_check_repl --conf=/etc/app1.cnfSun Apr 22 20:29:30 2018 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.Sun Apr 22 20:29:30 2018 - [info] Reading application default configuration from /etc/app1.cnf..Sun Apr 22 20:29:30 2018 - [info] Reading server configuration from /etc/app1.cnf..Sun Apr 22 20:29:30 2018 - [info] MHA::MasterMonitor version 0.58.Sun Apr 22 20:29:32 2018 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln193] There is no alive slave. We can't do failoverSun Apr 22 20:29:32 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations.  at /usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm line 329.Sun Apr 22 20:29:32 2018 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.Sun Apr 22 20:29:32 2018 - [info] Got exit code 1 (Not master dead).MySQL Replication Health is NOT OK!

解决方法:

(1).删除健康检查文件 rm -rf /var/log/masterha/app1/app1.master_status.health
(2).在宕机的数据库中重新同步到主服务器 change master to master_host…
(3).检查复制是否出错 masterha_check_repl --conf=/etc/mysqlmha/conf/app1.cnf
或者
(1).检查防火墙
文章转自

转载地址:http://sitn.baihongyu.com/

你可能感兴趣的文章
Mysql——深入浅出InnoDB底层原理
查看>>
MySQL“被动”性能优化汇总
查看>>
MySQL、HBase 和 Elasticsearch:特点与区别详解
查看>>
MySQL、Redis高频面试题汇总
查看>>
MYSQL、SQL Server、Oracle数据库排序空值null问题及其解决办法
查看>>
mysql一个字段为空时使用另一个字段排序
查看>>
MySQL一个表A中多个字段关联了表B的ID,如何关联查询?
查看>>
MYSQL一直显示正在启动
查看>>
MySQL一站到底!华为首发MySQL进阶宝典,基础+优化+源码+架构+实战五飞
查看>>
MySQL万字总结!超详细!
查看>>
Mysql下载以及安装(新手入门,超详细)
查看>>
MySQL不会性能调优?看看这份清华架构师编写的MySQL性能优化手册吧
查看>>
MySQL不同字符集及排序规则详解:业务场景下的最佳选
查看>>
Mysql不同官方版本对比
查看>>
MySQL与Informix数据库中的同义表创建:深入解析与比较
查看>>
mysql与mem_细说 MySQL 之 MEM_ROOT
查看>>
MySQL与Oracle的数据迁移注意事项,另附转换工具链接
查看>>
mysql丢失更新问题
查看>>
MySQL两千万数据优化&迁移
查看>>
MySql中 delimiter 详解
查看>>