mha4mysql-manager icon indicating copy to clipboard operation
mha4mysql-manager copied to clipboard

fix master host which not include in hosts file will excute second…

Open kobehaha opened this issue 7 years ago • 0 comments

…ary_check failed

we find something shold be better during checking masterha_secondary_check on MHA node.

command

secondary_check_script=masterha_secondary_check -s 172.17.16.245 -s 172.17.2.201 --port=60122 --user=mysql --master_host=xxx-db-0001 --master_ip=172.17.16.119 --master_port=3306

We find it will login remote (-s) host and excute perl scripts [ 'ssh_port $ssh_user_host 'perl -e xxxxx ' ] to check mysql status, But if you dont config master host in hosts file on every node, so remote monitor server could not find this host to ip, it will failed and return "Monitoring server $monitoring_server is reachable, Master is not writable from $monitoring_server. OK." , this leading to masterha_secondary_check return 2, and not failover.(use IO::Socket: xxx $master_host ) So if you change perl script master_host ----> master_ip , everthing is fine.

This is a very important detail, please seriously consider

kobehaha avatar Nov 23 '17 15:11 kobehaha