[테스트 환경]
OS : CentOS7 64bit
DB : MariaDB 10.1.12
1. Error 내용
- Replication 설정 확인 시 다음과 같은 에러 발생
[maria@ scripts]$ masterha_check_repl --conf=/maria_mha/[서비스명]/conf/[설정파일명].cnf Mon Aug 8 18:53:33 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping. Mon Aug 8 18:53:33 2016 - [info] Reading application default configuration from /maria_mha/[서비스명]/conf/[설정파일명].cnf.. Mon Aug 8 18:53:33 2016 - [info] Reading server configuration from /maria_mha/[서비스명]/conf/[설정파일명].cnf.. Mon Aug 8 18:53:33 2016 - [info] MHA::MasterMonitor version 0.56. Mon Aug 8 18:53:33 2016 - [debug] Connecting to servers.. Mon Aug 8 18:53:33 2016 - [debug] Connected to: 192.168.3.206(192.168.3.206:3306), user=root Mon Aug 8 18:53:33 2016 - [debug] Number of slave worker threads on host 192.168.3.206(192.168.3.206:3306): 0 Mon Aug 8 18:53:33 2016 - [debug] Connected to: 192.168.3.207(192.168.3.207:3306), user=root Mon Aug 8 18:53:33 2016 - [debug] Number of slave worker threads on host 192.168.3.207(192.168.3.207:3306): 0 Mon Aug 8 18:53:33 2016 - [debug] Comparing MySQL versions.. Mon Aug 8 18:53:33 2016 - [debug] Comparing MySQL versions done. Mon Aug 8 18:53:33 2016 - [debug] Connecting to servers done. Mon Aug 8 18:53:33 2016 - [info] GTID failover mode = 0 Mon Aug 8 18:53:33 2016 - [info] Dead Servers: Mon Aug 8 18:53:33 2016 - [info] Alive Servers: Mon Aug 8 18:53:33 2016 - [info] 192.168.3.206(192.168.3.206:3306) Mon Aug 8 18:53:33 2016 - [info] 192.168.3.207(192.168.3.207:3306) Mon Aug 8 18:53:33 2016 - [info] Alive Slaves: Mon Aug 8 18:53:33 2016 - [info] 192.168.3.207(192.168.3.207:3306) Version=10.1.12-MariaDB (oldest major version between slaves) log-bin:enabled Mon Aug 8 18:53:33 2016 - [debug] Relay log info repository: FILE Mon Aug 8 18:53:33 2016 - [info] Replicating from 192.168.3.206(192.168.3.206:3306) Mon Aug 8 18:53:33 2016 - [info] Primary candidate for the new Master (candidate_master is set) Mon Aug 8 18:53:33 2016 - [info] Current Alive Master: 192.168.3.206(192.168.3.206:3306) Mon Aug 8 18:53:33 2016 - [info] Checking slave configurations.. Mon Aug 8 18:53:33 2016 - [warning] relay_log_purge=0 is not set on slave 192.168.3.207(192.168.3.207:3306). Mon Aug 8 18:53:33 2016 - [info] Checking replication filtering settings.. Mon Aug 8 18:53:33 2016 - [info] binlog_do_db= , binlog_ignore_db= Mon Aug 8 18:53:33 2016 - [info] Replication filtering check ok. Mon Aug 8 18:53:33 2016 - [info] GTID (with auto-pos) is not supported Mon Aug 8 18:53:33 2016 - [info] Starting SSH connection tests.. Mon Aug 8 18:53:34 2016 - [debug] Mon Aug 8 18:53:33 2016 - [debug] Connecting via SSH from maria@192.168.3.206(192.168.3.206:22) to maria@192.168.3.207(192.168.3.207:22).. Mon Aug 8 18:53:34 2016 - [debug] ok. Mon Aug 8 18:53:34 2016 - [debug] Mon Aug 8 18:53:34 2016 - [debug] Connecting via SSH from maria@192.168.3.207(192.168.3.207:22) to maria@192.168.3.206(192.168.3.206:22).. Mon Aug 8 18:53:34 2016 - [debug] ok. Mon Aug 8 18:53:34 2016 - [info] All SSH connection tests passed successfully. Mon Aug 8 18:53:34 2016 - [info] Checking MHA Node version.. Mon Aug 8 18:53:35 2016 - [info] Version check ok. Mon Aug 8 18:53:35 2016 - [info] Checking SSH publickey authentication settings on the current master.. Mon Aug 8 18:53:35 2016 - [debug] SSH connection test to 192.168.3.206, option -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o BatchMode=yes -o ConnectTimeout=5, timeout 5 Mon Aug 8 18:53:35 2016 - [info] HealthCheck: SSH to 192.168.3.206 is reachable. Mon Aug 8 18:53:35 2016 - [error][/usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm, ln122] Got error when getting node version. Error: Mon Aug 8 18:53:35 2016 - [error][/usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm, ln123] bash: apply_diff_relay_logs: command not found Mon Aug 8 18:53:35 2016 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln132] Failed to get MHA node version on the current master even though current master is reachable via SSH! Mon Aug 8 18:53:35 2016 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /bin/masterha_check_repl line 48. Mon Aug 8 18:53:35 2016 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers. Mon Aug 8 18:53:35 2016 - [info] Got exit code 1 (Not master dead). MySQL Replication Health is NOT OK!
2. 해결 방안
- Master와 Slave에 mha 파일이 설치되어있는지 확인한다.
- mha4mysql-node-0.56-0.el6.noarch
- mha4mysql-manager-0.56-0.el6.noarch
'MariaDB > MHA' 카테고리의 다른 글
[에러] [error] Can't exec "master_ip_failover": 허가 거부 (0) | 2017.07.26 |
---|