[appuser@localhost ~]$ masterha_check_repl --conf=/etc/masterha_3309/app1.cnf
Fri Apr 15 10:33:04 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Fri Apr 15 10:33:04 2016 - [info] Reading application default configuration from /etc/masterha_3309/app1.cnf..
Fri Apr 15 10:33:04 2016 - [info] Reading server configuration from /etc/masterha_3309/app1.cnf..
Fri Apr 15 10:33:04 2016 - [info] MHA::MasterMonitor version 0.57.
perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/auto/DBD/mysql/mysql.so: undefined symbol: Perl_Istack_sp_ptr
perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/auto/DBD/mysql/mysql.so: undefined symbol: Perl_Istack_sp_ptr
perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/auto/DBD/mysql/mysql.so: undefined symbol: Perl_Istack_sp_ptr
Fri Apr 15 10:33:04 2016 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln309] Got fatal error, stopping operations
Fri Apr 15 10:33:04 2016 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. at /usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm line 329.
Fri Apr 15 10:33:04 2016 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.
Fri Apr 15 10:33:04 2016 - [info] Got exit code 1 (Not master dead).
MySQL Replication Health is NOT OK!
使用的系统是Centos7的。由于Centos7自带的数据库是Mariadb的,而我需要的是Mysql的,所以安装mysql的时候卸载了Mariadb的libs,不然会报冲突的错误。
但是MHA的Node端依赖于perl-DBD-mysql,我在使用yum安装perl-DBD-mysql的时候又报冲突的错误,估计原因应该是perl-DBD-mysql适用于7版本的默认数据库文件也是Mariadb的:
file /usr/share/mysql/ukrainian/errmsg.sys from install of mariadb-libs-1:5.5.47-1.el7_2.x86_64 conflicts with file from package MySQL-server-5.6.24-1.linux_glibc2.5.x86_64
因此我使用了适用于Centos6的perl-DBD-mysql版本的rpm包手动安装,这样是解决了安装MHA Node端的问题,但是一直在担心会不会后面出现兼容性的问题。。。然后上面的报错我在想会不会就是版本不一致的问题呢?