MariaDB/MHA

[에러] [error] Can't exec "master_ip_failover": 허가 거부

알 수 없는 사용자 2017. 7. 26. 15:27

[테스트 환경]

OS : CentOS7 64bit

DB : MariaDB 10.2.7


1. Error 내용

  - 설정 확인 시 master_ip_failover 파일에 대해서 허가 거부가 발생하여 Replication Health 체크 실패

[maria@ scripts]masterha_check_repl --conf=/maria_mha/[서비스명]/conf/[설정파일명].cnf 
.....
Wed Jul 26 04:28:54 2017 - [info]   /maria_mha/[서비스명]/scripts/master_ip_failover --command=status --ssh_user=[유저명] --orig_master_host=[호스트명] --orig_master_ip=[ip] --orig_master_port=3306 
Wed Jul 26 04:28:54 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. Can't exec "/maria_mha/[서비스명]/scripts/master_ip_failover": 허가 거부 at /usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm line 68.
Wed Jul 26 04:28:54 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Wed Jul 26 04:28:54 2017 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!
Wed Jul 26 04:28:54 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln226]  Failed to get master_ip_failover_script status with return code 1:0.
Wed Jul 26 04:28:54 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations.  at /bin/masterha_check_repl line 48.
Wed Jul 26 04:28:54 2017 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Wed Jul 26 04:28:54 2017 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

2. 해결 방안

  - master_ip_failover 파일에 대해서 해당 유저가 실행권한을 부여한다.

[maria@ scripts]ls -al
-rw-r--r--. 1 maria maria  4761  7월 26 04:31 master_ip_failover

[maria@ scripts]chmod 744 master_ip_failover

[maria@ scripts]ls -al
-rwxr--r--. 1 maria maria  4761  7월 26 04:31 master_ip_failover