kylin3278 发表于 2015-08-04 16:11

mysql mha masterha_check_repl 错误

# masterha_check_repl --conf=/etc/app1.cnf
Tue Aug4 15:51:26 2015 - Reading default configuration from /etc/masterha_default.cnf..
Tue Aug4 15:51:26 2015 - Reading application default configuration from /etc/app1.cnf..
Tue Aug4 15:51:26 2015 - Reading server configuration from /etc/app1.cnf..
Tue Aug4 15:51:26 2015 - MHA::MasterMonitor version 0.56.
Tue Aug4 15:51:29 2015 - GTID failover mode = 1
Tue Aug4 15:51:29 2015 - Dead Servers:
Tue Aug4 15:51:29 2015 - Alive Servers:
Tue Aug4 15:51:29 2015 -    192.168.1.201(192.168.1.201:3306)
Tue Aug4 15:51:29 2015 -    192.168.1.202(192.168.1.202:3310)
Tue Aug4 15:51:29 2015 - Alive Slaves:
Tue Aug4 15:51:29 2015 -    192.168.1.202(192.168.1.202:3310)Version=5.6.24-enterprise-commercial-advanced-log (oldest major version between slaves) log-bin:enabled
Tue Aug4 15:51:29 2015 -    GTID ON
Tue Aug4 15:51:29 2015 -    Replicating from 192.168.1.201(192.168.1.201:3306)
Tue Aug4 15:51:29 2015 -    Primary candidate for the new Master (candidate_master is set)
Tue Aug4 15:51:29 2015 - Current Alive Master: 192.168.1.201(192.168.1.201:3306)
Tue Aug4 15:51:29 2015 - Checking slave configurations..
Tue Aug4 15:51:29 2015 - Checking replication filtering settings..
Tue Aug4 15:51:29 2015 - binlog_do_db= record,test, binlog_ignore_db= information_schema,mysql
Tue Aug4 15:51:29 2015 - Replication filtering check ok.
Tue Aug4 15:51:29 2015 - GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.
Tue Aug4 15:51:29 2015 - Checking SSH publickey authentication settings on the current master..
Tue Aug4 15:51:34 2015 - HealthCheck: Got timeout on checking SSH connection to 192.168.1.201! at /usr/share/perl5/vendor_perl/MHA/HealthCheck.pm line 342.
Tue Aug4 15:51:34 2015 -
192.168.1.201(192.168.1.201:3306) (current master)
+--192.168.1.202(192.168.1.202:3310)

Tue Aug4 15:51:34 2015 - Checking replication health on 192.168.1.202..
Tue Aug4 15:51:34 2015 - ok.
Tue Aug4 15:51:34 2015 - Checking master_ip_failover_script status:
Tue Aug4 15:51:34 2015 -    /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_failover --command=status --ssh_user=root --orig_master_host=192.168.1.201 --orig_master_ip=192.168.1.201 --orig_master_port=3306
Bareword "FIXME_xxx" not allowed while "strict subs" in use at /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_failover line 93.
Execution of /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_failover aborted due to compilation errors.
Tue Aug4 15:51:35 2015 - Failed to get master_ip_failover_script status with return code 255:0.
Tue Aug4 15:51:35 2015 - Error happened on checking configurations.at /usr/bin/masterha_check_repl line 48
Tue Aug4 15:51:35 2015 - Error happened on monitoring servers.
Tue Aug4 15:51:35 2015 - Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

# cat /etc/app1.cnf

user=root
password=123456
manager_workdir=/var/log/masterha/app1
manager_log=/var/log/masterha/app1/manager.log
remote_workdir=/var/log/masterha/app1


hostname=192.168.1.201
port=3306


hostname=192.168.1.202
port=3310
check_repl_delay=0
candidate_master=1

# cat /etc/masterha_default.cnf

user=root
password=123456
ssh_user=root
master_binlog_dir= /var/lib/mysql/log,/home/mysql/slave01/log
remote_workdir=/database/mha/log/masterha
repl_password=repl
repl_user=repl
secondary_check_script= masterha_secondary_check -s 192.168.1.201 -s 192.168.1.202
ping_interval=3
master_ip_failover_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_failover
#shutdown_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/power_manager
report_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/send_report
master_ip_online_change_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_online_change

请问是什么问题呢

asdf2110 发表于 2015-08-04 17:35

可以把底下那3行注掉,不是必须的

master_ip_failover_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_failover
#shutdown_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/power_manager
report_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/send_report
master_ip_online_change_script= /database/masterha/mha4mysql-manager-0.56/samples/scripts/master_ip_online_change

kylin3278 发表于 2015-08-05 09:18

回复 2# asdf2110
是我脚本没写好

   

renxiao2003 发表于 2015-08-13 10:20

楼主可以用了吗?

kylin3278 发表于 2015-08-20 10:55

回复 4# renxiao2003

可以用了,但是脚本还在研究中
   

renxiao2003 发表于 2015-08-20 13:02

慢慢研究,特定的脚本有特定的调用方式。
页: [1]
查看完整版本: mysql mha masterha_check_repl 错误