MHA集群时的报错信息解决

MHA集群时的报错信息解决_第1张图片

masterha_check_ssh --conf=/etc/mha/app1.cnf		//检查MHA的SSH配置状态

报错信息:1)

[root@mham mha4mysql-manager-0.56]# masterha_check_ssh --conf=/etc/mha_manager/app1.cnf
Can't locate Log/Dispatch.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/share/perl5/MHA/SSHCheck.pm line 29.
BEGIN failed--compilation aborted at /usr/local/share/perl5/MHA/SSHCheck.pm line 29.
Compilation failed in require at /usr/local/bin/masterha_check_ssh line 25.
BEGIN failed--compilation aborted at /usr/local/bin/masterha_check_ssh line 25.
[root@mham mha4mysql-manager-0.56]#

该错误提示是因为MHAManager主机的软件未安装完整,将所需软件安装:

[root@mham mha-soft-student]# ls
mha4mysql-manager-0.56                          perl-Mail-Sender-0.8.23-1.el7.noarch.rpm
mha4mysql-manager-0.56.tar.gz                   perl-Mail-Sendmail-0.79-21.el7.art.noarch.rpm
mha4mysql-node-0.56-0.el6.noarch.rpm            perl-MIME-Lite-3.030-1.el7.noarch.rpm
perl-Config-Tiny-2.14-7.el7.noarch.rpm          perl-MIME-Types-1.38-2.el7.noarch.rpm
perl-Email-Date-Format-1.002-15.el7.noarch.rpm  perl-Parallel-ForkManager-1.18-2.el7.noarch.rpm
perl-Log-Dispatch-2.41-1.el7.1.noarch.rpm
[root@mham mha-soft-student]# yum -y  install  perl-*.rpm
[root@mham mha-soft-student]# yum  -y  install   perl-DBD-mysql
[root@mham mha-soft-student]# rpm  -ivh  mha4mysql-node-0.56-0.el6.noarch.rpm

报错信息:2)

Fri Jul 13 14:55:00 2018 - [error][/usr/local/share/perl5/MHA/SSHCheck.pm, ln111] SSH connection from [email protected](192.168.1.14:22) to [email protected](192.168.1.15:22) failed!
SSH Configuration Check Failed!
 at /usr/local/bin/masterha_check_ssh line 44.

原因是ssh免密码时错误
集群中ssh免密登陆未设置好,仔细检查并重新设置好集群中的全部机器的ssh免密登录即可。

检测主从同步的报错信息:

56]# masterha_check_repl --conf=/etc/mha/app1.cnf		//检测主从同步

报错信息:1)

.......
Bareword "FIXME_xxx" not allowed while "strict subs" in use at /etc/mha/script/master_ip_failover line 100.
Execution of /etc/mha/script/master_ip_failover aborted due to compilation errors
......
MySQL Replication Health is NOT OK!

脚本原因
后者在用的时候不允许前者出现,进入脚本里找到这个给屏蔽掉。
MHA集群时的报错信息解决_第2张图片
报错信息:2)

Fri Jul 13 15:06:03 2018 - [info]   Connecting to [email protected](192.168.1.14:22).. 
  Checking slave recovery environment settings..
    Opening /var/lib/mysql/relay-log.info ... ok.
    Relay log found at /var/lib/mysql, up to mariadb-relay-bin.000006
    Temporary relay log file is /var/lib/mysql/mariadb-relay-bin.000006
    Testing mysql connection and privileges..ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.3' (using password: YES)
mysql command failed with rc 1:0!
.........
MySQL Replication Health is NOT OK!

这是来自集群中单台节点配置检查的错误,从错误信息可以看到Access denied for user ‘root’@‘192.168.4.3’ (using password: YES),问题就是说连接不上该节点的数据库。
重新给root授权

你可能感兴趣的:(MySQL数据库知识集,配置MHA集群时的报错信息解决)