主服务器连接不上两个从服务器,但是两个从服务器可以连接主服务器
Tue Jul 25 00:57:19 2023 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Tue Jul 25 00:57:19 2023 - [info] Reading application default configuration from /etc/mha/mha.cnf..
Tue Jul 25 00:57:19 2023 - [info] Reading server configuration from /etc/mha/mha.cnf..
Tue Jul 25 00:57:19 2023 - [info] Starting SSH connection tests..
Tue Jul 25 00:57:19 2023 - [error][/usr/local/share/perl5/MHA/SSHCheck.pm, ln63]
Tue Jul 25 00:57:19 2023 - [debug] Connecting via SSH from [email protected](192.168.64.131:22) to [email protected](192.168.64.133:22)..
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Tue Jul 25 00:57:19 2023 - [error][/usr/local/share/perl5/MHA/SSHCheck.pm, ln111] SSH connection from [email protected](192.168.64.131:22) to [email protected](192.168.64.133:22) failed!
Tue Jul 25 00:57:36 2023 - [debug]
Tue Jul 25 00:57:20 2023 - [debug] Connecting via SSH from [email protected](192.168.64.135:22) to [email protected](192.168.64.131:22)..
Tue Jul 25 00:57:25 2023 - [debug] ok.
Tue Jul 25 00:57:25 2023 - [debug] Connecting via SSH from [email protected](192.168.64.135:22) to [email protected](192.168.64.133:22)..
Tue Jul 25 00:57:36 2023 - [debug] ok.
Tue Jul 25 00:57:36 2023 - [debug]
Tue Jul 25 00:57:19 2023 - [debug] Connecting via SSH from [email protected](192.168.64.133:22) to [email protected](192.168.64.131:22)..
Tue Jul 25 00:57:25 2023 - [debug] ok.
Tue Jul 25 00:57:25 2023 - [debug] Connecting via SSH from [email protected](192.168.64.133:22) to [email protected](192.168.64.135:22)..
Tue Jul 25 00:57:36 2023 - [debug] ok.
SSH Configuration Check Failed!
原因分析:
三台服务器之间相互ssh测试互通,但是还是连接不上
--三台服务器之间相互测试
ssh <服务器IP> date
【MHA】在连接时会先跟自己测试连接!
解决办法:
在主服务器上操作:
--给主服务器设置建立自己免密登录
ssh-copy-id <主服务器IP>