Export to GitHub

mysql-master-ha - issue #91

masterha_check_repl error when relay_log_info_repository=table


Posted on Jun 9, 2014 by Helpful Cat

when i executed "masterha_check_repl --conf=/etc/masterha/app1/app1.cnf" i got some errors like followings:

Fri Jun 6 15:58:12 2014 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping. Fri Jun 6 15:58:12 2014 - [info] Reading application default configurations from /etc/masterha/app1/app1.cnf.. Fri Jun 6 15:58:12 2014 - [info] Reading server configurations from /etc/masterha/app1/app1.cnf.. Fri Jun 6 15:58:12 2014 - [info] MHA::MasterMonitor version 0.55. Fri Jun 6 15:58:12 2014 - [error][/usr/share/perl5/vendor_perl/MHA/Server.pm, ln241] Getting relay log directory or current relay logfile from replication table failed on 192.168.100.55(192.168.100.55:3306)! Fri Jun 6 15:58:12 2014 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln386] Error happend on checking configurations. at /usr/share/perl5/vendor_perl/MHA/ServerManager.pm line 269 Fri Jun 6 15:58:12 2014 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln482] Error happened on monitoring servers. Fri Jun 6 15:58:12 2014 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

======================================

mha version : node-0.54 manager-0.55 mysql version : 5.6.15-rel63.0-log OS version : centos 6.4 x_85 64

1,some parameters in my.cnf on both master and slave

relay_log_info_repository=TABLE master_info_repository=TABLE

2, MHA app1.cnf

[server default] manager_log=/var/log/managemha.log manager_workdir=/var/log/managemha master_ip_failover_script="/usr/local/bin/master_ip_failover" master_ip_online_change_script="/usr/local/bin/master_ip_online_change" password=xxxooo ping_interval=4 ssh_connection_timeout=15 ping_type=CONNECT remote_workdir=/data/nodemha repl_password=xxxx repl_user=repl ssh_port=22 ssh_user=root user=root

[server1] candidate_master=1 ignore_fail=1 hostname=192.168.100.55 master_binlog_dir=/data/percona-data-3307 port=3307

[server2] candidate_master=1 ignore_fail=1 hostname=192.168.100.55 master_binlog_dir=/data/percona-data-3306 port=3306

192.168.100.55:3306 is the master while 192.168.100.55:3307 is the slave.

look this(192.168.100.55:3307):

(user:root time: 11:44 port: 3307)[db: (none)]select * from mysql.slave_relay_log_info; +-----------------+--------------------------+---------------+------------------+----------------+-----------+-------------------+----+ | Number_of_lines | Relay_log_name | Relay_log_pos | Master_log_name | Master_log_pos | Sql_delay | Number_of_workers | Id | +-----------------+--------------------------+---------------+------------------+----------------+-----------+-------------------+----+ | 7 | ./mysql-relay-bin.000002 | 24298857 | mysql-bin.000008 | 52881234 | 0 | 0 | 1 | +-----------------+--------------------------+---------------+------------------+----------------+-----------+-------------------+----+

need your help

thanks !

Comment #1

Posted on Jun 9, 2014 by Grumpy Bear

Would you please show the result of the following command on the master (192.168.100.55:3306)?

SHOW SLAVE STATUS

The error code path is entered when parsing slave servers only. So I assume on 3306 slave definition exists. If it exists, would you please remove slave definition by RESET SLAVE ALL and try again?

Comment #2

Posted on Jun 9, 2014 by Helpful Cat

after testing ,i found that if set relay_log_info_repository=TABLE and master_info_repository=TABLE MHA also check table mysql.slave_relay_log_info on master ,so when mha found there is nothing in mysql.slave_relay_log_info then produces errors .

solution: modify my.cnf on the master (192.168.100.55:3306) # relay_log_info_repository=TABLE # master_info_repository=TABLE then restart master

everything is ok

thank you !

Comment #3

Posted on Jan 5, 2015 by Massive Cat

I met this issue recently, maybe a master should not specialize the two slave parameters, so remove them in my.cnf is correct solution, mha-0.56 still has the issue.

Status: New

Labels:
Type-Defect Priority-Medium