leonlee81 / mysql-master-ha

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

Can't exec "apply_diff_relay_logs" #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Try start masterha_check_repl --conf=/etc/masterha/app1.cnf
2. Get this error:
[root@EGSNS-49-2 bin]# ./masterha_check_repl --conf=/etc/masterha/app1.cnf 
Fri Jun  1 14:13:46 2012 - [warning] Global configuration file 
/etc/masterha_default.cnf not found. Skipping.
Fri Jun  1 14:13:46 2012 - [info] Reading application default configurations 
from /etc/masterha/app1.cnf..
Fri Jun  1 14:13:46 2012 - [info] Reading server configurations from 
/etc/masterha/app1.cnf..
Fri Jun  1 14:13:46 2012 - [info] MHA::MasterMonitor version 0.53.
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, 
ln151] Can't exec "apply_diff_relay_logs": No such file or directory at 
/usr/local/share/perl5/MHA/ManagerUtil.pm line 116.
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln383] Error happend on checking configurations. Died at 
/usr/local/share/perl5/MHA/ManagerUtil.pm line 152.
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln478] Error happened on monitoring servers.
Fri Jun  1 14:13:46 2012 - [info] Got exit code 1 (Not master dead).
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, 
ln122] Got error when getting node version. Error:
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, 
ln123] 

MySQL Replication Health is NOT OK!
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/ManagerUtil.pm, 
ln151] Use of uninitialized value $host in concatenation (.) or string at 
/usr/local/share/perl5/MHA/ManagerUtil.pm line 139.
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln383] Error happend on checking configurations. Died at 
/usr/local/share/perl5/MHA/ManagerUtil.pm line 152.
Fri Jun  1 14:13:46 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln478] Error happened on monitoring servers.
Fri Jun  1 14:13:46 2012 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NO

3. This is my /etc/masterha/app1.cnf
[server default]
manager_workdir=/masterha/app1
manager_log=/masterha/app1/manager.log
remote_workdir=/
user=root
password=emag@234
ssh_user=root
repl_user=rep
repl_password=rep
shutdown_script=""
master_ip_failover_script="/apps/mha4mysql-manager-0.53/samples/scripts/master_i
p_failover"
report_script=""
remote_workdir=/apps/mha4mysql-node-0.53/section1
[server1]
hostname=192.168.49.9
[server2]
hostname=192.168.49.2
candidate_master=1
[server3]
hostname=192.168.49.1
[server4]
hostname=192.168.49.3
[server5]
hostname=192.168.49.4

Pls help me explain why does this error happen?

OS:redhat 6.2 64bit   
Mysql: 5.5.22( build from source )
basedir: /apps/mysql
datadir: /apps/mysql/data

current master:192.168.49.9 
standby master:192.168.49.1
masterha_check_ssh:OK

Pls help me check and give me an advice as soon as possible

Thanks,
ZacLeep@gmail.com

Original issue reported on code.google.com by ZacL...@gmail.com on 1 Jun 2012 at 6:28

GoogleCodeExporter commented 9 years ago
You need to install "MHA Node" binary on all MySQL servers and Manager server. 
apply_diff_relay_logs is part of MHA Node binary. 
http://code.google.com/p/mysql-master-ha/wiki/Installation#Installing_MHA_Node

Original comment by Yoshinor...@gmail.com on 1 Jun 2012 at 7:09

GoogleCodeExporter commented 9 years ago
Thank you for your help.
With your help I solve the error.
But I got a new error.
[root@EGSNS-49-2 apps]# masterha_check_repl --conf=/etc/masterha/app1.cnf 
Fri Jun  1 17:37:44 2012 - [warning] Global configuration file 
/etc/masterha_default.cnf not found. Skipping.
Fri Jun  1 17:37:44 2012 - [info] Reading application default configurations 
from /etc/masterha/app1.cnf..
Fri Jun  1 17:37:44 2012 - [info] Reading server configurations from 
/etc/masterha/app1.cnf..
Fri Jun  1 17:37:44 2012 - [info] MHA::MasterMonitor version 0.53.
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln255] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 43) line 3.

 at /usr/local/share/perl5/MHA/DBHelper.pm line 181
 at /usr/local/share/perl5/MHA/Server.pm line 166
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln255] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 43) line 3.

 at /usr/local/share/perl5/MHA/DBHelper.pm line 181
 at /usr/local/share/perl5/MHA/Server.pm line 166
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln255] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 43) line 3.

 at /usr/local/share/perl5/MHA/DBHelper.pm line 181
 at /usr/local/share/perl5/MHA/Server.pm line 166
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln255] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 43) line 3.

 at /usr/local/share/perl5/MHA/DBHelper.pm line 181
 at /usr/local/share/perl5/MHA/Server.pm line 166
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln255] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
Compilation failed in require at (eval 43) line 3.

 at /usr/local/share/perl5/MHA/DBHelper.pm line 181
 at /usr/local/share/perl5/MHA/Server.pm line 166
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/ServerManager.pm, 
ln263] Got fatal error, stopping operations
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln383] Error happend on checking configurations.  at 
/usr/local/share/perl5/MHA/MasterMonitor.pm line 298
Fri Jun  1 17:37:44 2012 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, 
ln478] Error happened on monitoring servers.
Fri Jun  1 17:37:44 2012 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

Pls help me explain why does this error happen?

OS:redhat 6.2 64bit   
Mysql: 5.5.22( build from source )
basedir: /apps/mysql
datadir: /apps/mysql/data

current master:192.168.49.9 
standby master:192.168.49.1
masterha_check_ssh:OK

Pls help me check and give me an advice as soon as possible

Thanks,
ZacLeep@gmail.com

Original comment by ZacL...@gmail.com on 1 Jun 2012 at 9:47

GoogleCodeExporter commented 9 years ago
And I had installed the perl-DBD-MySQL package every node.

Original comment by ZacL...@gmail.com on 1 Jun 2012 at 9:49