masterha_check_ssh验证互信时候报错
[root@mha-m .ssh]# masterha_check_ssh -conf=/etc/mha_master/mha.cnf
Thu Nov 12 20:02:10 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
/etc/mha_master/mha.cnf:
at /usr/share/perl5/vendor_perl/MHA/SSHCheck.pm line 148.
错误原因是/etc/mha_master/mha.cnf文件中有空格存在
重新编辑/etc/mha_master/mha.cnf文件,去掉空格
[server default]
user=mhaadmin
password=mhapass
manager_workdir=/etc/mha_master/app1
manager_log=/etc/mha_master/manager.log
remote_workdir=/mydata/mha_master/app1
ssh_user=root
repl_user=repl
repl_password=oracle
ping_interval=1
[server1]
hostname=192.168.10.11
ssh_port=22
candidate_master=1
[server2]
hostname=192.168.10.12
ssh_port=22
candidate_master=1
[server3]
hostname=192.168.10.13
ssh_port=22
candidate_master=1
重新执行masterha_check_ssh文件
[root@mha-m]# masterha_check_ssh -conf=/etc/mha_master/mha.cnf
Thu Nov 12 20:04:25 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Thu Nov 12 20:04:25 2020 - [info] Reading application default configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:04:25 2020 - [info] Reading server configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:04:25 2020 - [info] Starting SSH connection tests..
Thu Nov 12 20:04:26 2020 - [debug]
Thu Nov 12 20:04:25 2020 - [debug] Connecting via SSH from root@192.168.10.11(192.168.10.11:22) to root@192.168.10.12(192.168.10.12:22)..
Warning: Permanently added '192.168.10.12' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug] ok.
Thu Nov 12 20:04:26 2020 - [debug] Connecting via SSH from root@192.168.10.11(192.168.10.11:22) to root@192.168.10.13(192.168.10.13:22)..
Warning: Permanently added '192.168.10.13' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug] ok.
Thu Nov 12 20:04:27 2020 - [debug]
Thu Nov 12 20:04:26 2020 - [debug] Connecting via SSH from root@192.168.10.12(192.168.10.12:22) to root@192.168.10.11(192.168.10.11:22)..
Warning: Permanently added '192.168.10.11' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug] ok.
Thu Nov 12 20:04:26 2020 - [debug] Connecting via SSH from root@192.168.10.12(192.168.10.12:22) to root@192.168.10.13(192.168.10.13:22)..
Warning: Permanently added '192.168.10.13' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug] ok.
Thu Nov 12 20:04:28 2020 - [debug]
Thu Nov 12 20:04:26 2020 - [debug] Connecting via SSH from root@192.168.10.13(192.168.10.13:22) to root@192.168.10.11(192.168.10.11:22)..
Warning: Permanently added '192.168.10.11' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:27 2020 - [debug] ok.
Thu Nov 12 20:04:27 2020 - [debug] Connecting via SSH from root@192.168.10.13(192.168.10.13:22) to root@192.168.10.12(192.168.10.12:22)..
Warning: Permanently added '192.168.10.12' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:27 2020 - [debug] ok.
Thu Nov 12 20:04:28 2020 - [info] All SSH connection tests passed successfully.