- 论坛徽章:
- 8
|
本帖最后由 zhancat200801 于 2016-09-06 10:17 编辑
在做MHA配置并测试的时候,执行如下命令:
masterha_check_repl --conf=/etc/app1.cnf
报错如下:
[root@host12 ~]# masterha_check_repl --conf=/etc/app1.cnf
Tue Sep 6 01:31:11 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Tue Sep 6 01:31:11 2016 - [info] Reading application default configuration from /etc/app1.cnf..
Tue Sep 6 01:31:11 2016 - [info] Reading server configuration from /etc/app1.cnf..
Tue Sep 6 01:31:11 2016 - [info] MHA::MasterMonitor version 0.56.
Tue Sep 6 01:31:12 2016 - [info] GTID failover mode = 1
Tue Sep 6 01:31:12 2016 - [info] Dead Servers:
Tue Sep 6 01:31:12 2016 - [info] Alive Servers:
Tue Sep 6 01:31:12 2016 - [info] 192.168.1.107(192.168.1.107:3306)
Tue Sep 6 01:31:12 2016 - [info] 192.168.1.111(192.168.1.111:3306)
Tue Sep 6 01:31:12 2016 - [info] 192.168.1.112(192.168.1.112:3306)
Tue Sep 6 01:31:12 2016 - [info] Alive Slaves:
Tue Sep 6 01:31:12 2016 - [info] 192.168.1.111(192.168.1.111:3306) Version=5.6.31-log (oldest major version between slaves) log-bin:enabled
Tue Sep 6 01:31:12 2016 - [info] GTID ON
Tue Sep 6 01:31:12 2016 - [info] Replicating from 192.168.1.107(192.168.1.107:3306)
Tue Sep 6 01:31:12 2016 - [info] Primary candidate for the new Master (candidate_master is set)
Tue Sep 6 01:31:12 2016 - [info] 192.168.1.112(192.168.1.112:3306) Version=5.6.31-log (oldest major version between slaves) log-bin:enabled
Tue Sep 6 01:31:12 2016 - [info] GTID ON
Tue Sep 6 01:31:12 2016 - [info] Replicating from 192.168.1.107(192.168.1.107:3306)
Tue Sep 6 01:31:12 2016 - [info] Not candidate for the new Master (no_master is set)
Tue Sep 6 01:31:12 2016 - [info] Current Alive Master: 192.168.1.107(192.168.1.107:3306)
Tue Sep 6 01:31:12 2016 - [info] Checking slave configurations..
Tue Sep 6 01:31:12 2016 - [info] Checking replication filtering settings..
Tue Sep 6 01:31:12 2016 - [info] binlog_do_db= , binlog_ignore_db=
Tue Sep 6 01:31:12 2016 - [info] Replication filtering check ok.
Tue Sep 6 01:31:12 2016 - [error][/usr/local/share/perl5/MHA/Server.pm, ln393] 192.168.1.111(192.168.1.111:3306): User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host.
Tue Sep 6 01:31:12 2016 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/local/share/perl5/MHA/ServerManager.pm line 1403
Tue Sep 6 01:31:12 2016 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Tue Sep 6 01:31:12 2016 - [info] Got exit code 1 (Not master dead).
MHA配置文件如下:
[server default]
user=muser
ssh_user=root
password=654321
manager_workdir=/home/mysql_mha
manager_log=/var/log/masterha/mha.log
#远程服务器的工作目录
remote_workdir=/home/mysql_mha
ssh_user=root
repl_user=repl
repl_password=654321
ping_interval=1
master_binlog_dir=/var/log/mysql/binlog
#master_ip_failover_script=/usr/bin/master_ip_failover
secondary_check_script=/usr/local/bin/masterha_secondary_check -s 192.168.1.126 -s 192.168.1.11 -s 192.168.1.107
[server1]
hostname=192.168.1.107
candidate_master=1
[server2]
hostname=192.168.1.111
candidate_master=1
[server3]
hostname=192.168.1.112
no_master=1
经过排查,网络、ssh联通性均没有问题,在master上检查授权也没有问题:
mysql> show grants for 'repl'@'%';
+-------------------------------------------------------------------------------------------------------------------------------------+
| Grants for repl@% |
+-------------------------------------------------------------------------------------------------------------------------------------+
| GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'repl'@'%' IDENTIFIED BY PASSWORD '*2A032F7C5BA932872F0F045E0CF6B53CF702F2C5' |
+-------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
权限检查没有问题,但报错明明是权限问题,太奇怪了,哪位高人帮忙排查一下,报错是什么原因?谢谢!
|
|