Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kobehaha
Copy link
Contributor

…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

…_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant