masterha_check_repl --conf=/etc/masterha/app1.cnf的各种报错及解决方法
分类:
文章
•
2025-04-27 08:28:11
masterha_check_repl --conf=/etc/masterha/app1.cnf的各种报错及解决方法
1、错误:User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host

解决方法:具有复制权限的用户(repl)必须在所有节点上都创建一次,具有管理权限的用户也是一样
2、错误:Master setting check failed!以及Master configuration failed.

解决方法:如果手动定义了二进制日志文件的路径,就必须在mha的配置文件中制定master_binlog_dir=二进制日志文件所在目录
3、错误:Failed to get master_ip_failover_script status with return code 255:0.

解决方法:网上的说法是Failover两种方式:一种是虚拟IP地址,一种是全局配置文件。MHA并没有限定使用哪一种方式,而是让用户自己选择,虚拟IP地址的方式会牵扯到其它的软件,比如keepalive软件,而且还要修改脚本master_ip_failover。所以这里暂时把 app1.cnf内容的master_ip_failover_script= /usr/local/bin/master_ip_failover这一项注释掉。
4、ERROR 1129 (HY000): Host '192.168.1.24' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

解决方法:刷新报错的host文件(哪个机器出错就在该机器上刷新,此处是192.168.1.24)
mysqladmin -uroot flush-hosts
5、Multi-master configuration is detected, but two or more masters are either writable (read-only is not set) or dead! Check configurations for details. Master configurations are as below:

解决方法:从服务器set global read_only=1;