IT Notebook

とあるエンジニアの備忘録

MHA - エラー「Getting relay log directory or current relay logfile from replication table failed」の原因

出力ログ

root@ip-10-17-254-230:/var/log/mha# masterha_check_repl --conf=/etc/sg3user03.cnf
Tue Oct 28 14:38:46 2014 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Tue Oct 28 14:38:46 2014 - [info] Reading application default configuration from /etc/sg3user03.cnf..
Tue Oct 28 14:38:46 2014 - [info] Reading server configuration from /etc/sg3user03.cnf..
Tue Oct 28 14:38:46 2014 - [info] MHA::MasterMonitor version 0.56.
Tue Oct 28 14:38:46 2014 - [error][/usr/local/share/perl/5.18.2/MHA/Server.pm, ln303]  Getting relay log directory or current relay logfile from replication table failed on 10.17.131.31(10.17.131.31:13303)!
Tue Oct 28 14:38:46 2014 - [error][/usr/local/share/perl/5.18.2/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations.  at /usr/local/share/perl/5.18.2/MHA/ServerManager.pm line 315.
Tue Oct 28 14:38:46 2014 - [error][/usr/local/share/perl/5.18.2/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Tue Oct 28 14:38:46 2014 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

原因

マスタを他のマスタからレプリケーションしていたため

対応

レプリケーションは一時的なものなので、「reset slave」を実行。 その後問題なく起動。