eryueniaobp / mysql-master-ha

Automatically exported from code.google.com/p/mysql-master-ha
0 stars 0 forks source link

Get Error when execute masterha_check_repl #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
config the parameter file : /etc/section1.cnf
[server default]
# mysql user and password
user=root
password=rootpass
# working directory on the manager
manager_workdir=/apps/mha4mysql-manager-0.53/workdir/section1
# manager log file
manager_log=/apps/mha4mysql-manager-0.53/workdir/section1/section1.log
# working directory on MySQL servers
remote_workdir=/apps/mha4mysql-node-0.53/section1
# master_binlog_dir
master_binlog_dir=/apps/mysql-5.5.16/data
# master_ip_failover_script
master_ip_failover_script=/usr/local/samples/bin/master_ip_failover
# shutdown_script
shutdown_script=/usr/local/samples/bin/power_manager
# master_ip_online_change_script
master_ip_online_change_script=/usr/local/samples/bin/master_ip_online_change

[server1]
hostname=192.168.167.71
[server2]
hostname=192.168.167.47
candidate_master=1
[server3]
hostname=192.168.167.46

when i execute the masterha_check_repl ,get the follow error :

Fri Feb  3 15:00:45 2012 - [info]   /usr/local/samples/bin/master_ip_failover 
--command=status --ssh_user=root --orig_master_host=192.168.167.47 
--orig_master_ip=192.168.167.47 --orig_master_port=3306 
Bareword "FIXME_xxx" not allowed while "strict subs" in use at 
/usr/local/samples/bin/master_ip_failover line 88.
Execution of /usr/local/samples/bin/master_ip_failover aborted due to 
compilation errors.
Fri Feb  3 15:00:45 2012 - 
[error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln214]  Failed to 
get master_ip_failover_script status with return code 255:0.
Fri Feb  3 15:00:45 2012 - 
[error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln383] Error 
happend on checking configurations.  at /usr/bin/masterha_check_repl line 48
Fri Feb  3 15:00:45 2012 - 
[error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln478] Error 
happened on monitoring servers.
Fri Feb  3 15:00:45 2012 - [info] Got exit code 1 (Not master dead).

if i marked the parameter "master_ip_failover_script","shutdown_script",
"master_ip_online_change_script" , check repl was ok.

can you tell me ,why ?

i used version of 0.53 on linux enterprise 5.

Original issue reported on code.google.com by cloudhor...@163.com on 3 Feb 2012 at 7:23

GoogleCodeExporter commented 9 years ago
Bareword "FIXME_xxx" not allowed while "strict subs" in use at 
/usr/local/samples/bin/master_ip_failover line 88.

Modify line 88 as you like. This is a sample script that should be customized 
on users' environments, so it's incomplete. 

Original comment by Yoshinor...@gmail.com on 3 Feb 2012 at 7:27

GoogleCodeExporter commented 9 years ago
Can you give me an example for ip failover ? 
i don't know how to use it 
Thanks 

Original comment by cloudhor...@163.com on 4 Feb 2012 at 5:29

GoogleCodeExporter commented 9 years ago
Can you give me an example for ip failover ? 
i don't know how to use it 
Thanks

Original comment by ssf...@gmail.com on 17 Jun 2013 at 5:53

GoogleCodeExporter commented 9 years ago
I don't know how to use it too,Please give a explanation!
ThankS. 

Original comment by tiandong...@gmail.com on 24 Dec 2013 at 10:49

GoogleCodeExporter commented 9 years ago
Typical usage for ip failover script is updating master's ip address: by 
updating VIP, updating catalog database where master's ip is managed, etc.

You can freely write master_ip_failover_script by any language (Perl/PHP/etc), 
and arguments are passed via MHA. See below wiki for details. Built-in 
master_ip_failover script is just a sample script so you need to customize 
based on your environment.
http://code.google.com/p/mysql-master-ha/wiki/Parameters#master_ip_failover_scri
pt

Original comment by Yoshinor...@gmail.com on 26 Dec 2013 at 6:56