Open yangmin24 opened 6 years ago
[root@mha ~]# ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=20 -o StrictHostKeyChecking=no -o ConnectionAttempts=5 -o PasswordAuthentication=no -o BatchMode=yes root@192.168.94.202 -p 22 "apply_diff_relay_logs --version" 2>&1 bash: apply_diff_relay_logs: command not found [root@mha ~]#
[root@mha ~]# ssh slave2 "which apply_diff_relay_logs" which: no apply_diff_relay_logs in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin) [root@mha ~]# [root@mha ~]# ssh slave2 "source /root/.bash_profile; which apply_diff_relay_logs;" /usr/local/mha/bin/apply_diff_relay_logs [root@mha ~]#
i found when 'ssh' to slave node ,it would not execute the env file . so i add "source /root/.bash_profile; " to the source code . vi /usr/local/perl/lib/site_perl/5.28.0/MHA/ManagerUtil.pm my $command = "source /root/.bash_profile;apply_diff_relay_logs --version";
i did installed the node manager , but when i tested masterha_check_repl ,it would pup-up the following error .
masterha_check_repl --conf=/etc/masterha/app1.cnf 。。。。。。。。。。。。。。 Tue Jul 17 01:52:34 2018 - [info] GTID (with auto-pos) is not supported Tue Jul 17 01:52:34 2018 - [info] Starting SSH connection tests.. Tue Jul 17 01:52:36 2018 - [info] All SSH connection tests passed successfully. Tue Jul 17 01:52:36 2018 - [info] Checking MHA Node version.. Tue Jul 17 01:52:36 2018 - [error][/usr/local/perl/lib/site_perl/5.28.0/MHA/ManagerUtil.pm, ln122] Got error when getting node version. Error: Tue Jul 17 01:52:36 2018 - [error][/usr/local/perl/lib/site_perl/5.28.0/MHA/ManagerUtil.pm, ln123] bash: apply_diff_relay_logs: command not found Tue Jul 17 01:52:36 2018 - [error][/usr/local/perl/lib/site_perl/5.28.0/MHA/ManagerUtil.pm, ln150] node version on 192.168.94.202 not found! Is MHA Node package installed ? at /usr/local/perl/lib/site_perl/5.28.0/MHA/MasterMonitor.pm line 380. Tue Jul 17 01:52:36 2018 - [error][/usr/local/perl/lib/site_perl/5.28.0/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. node version on 192.168.94.202 not found! Is MHA Node package installed ? at /usr/local/perl/lib/site_perl/5.28.0/MHA/MasterMonitor.pm line 380. ...propagated at /usr/local/perl/lib/site_perl/5.28.0/MHA/ManagerUtil.pm line 151. Tue Jul 17 01:52:36 2018 - [error][/usr/local/perl/lib/site_perl/5.28.0/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers. Tue Jul 17 01:52:36 2018 - [info] Got exit code 1 (Not master dead).