When building mha, the following error was reported when using the masterha_check_ssh script to do ssh communication between the three nodes.
Master: 192.168.0.60 master
backup1: 192.168.0.61 slave1
Backup 2: 192.168.0.62 slave2, while the management node of mha is placed on the second slave
[root@manager mha_master]# masterha_check_ssh –global_conf=/etc/mha_master/mha.cnf –conf=/etc/mha_master/mha.cnf
Sun Sep 26 14:30:23 2021 – [info] Reading default configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:30:23 2021 – [info] Reading application default configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:30:23 2021 – [info] Reading server configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:30:23 2021 – [info] Starting SSH connection tests…
Sun Sep 26 14:30:24 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63]
Sun Sep 26 14:30:23 2021 – [debug] Connecting via SSH from [email protected](192.168.0.60:22) to [email protected](192.168.0.61:22)…
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Sun Sep 26 14:30:24 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln111] SSH connection from [email protected](192.168.0.60:22) to [email protected](192.168.0.61:22) failed!
Sun Sep 26 14:30:24 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63]
Sun Sep 26 14:30:24 2021 – [debug] Connecting via SSH from [email protected](192.168.0.61:22) to [email protected](192.168.0.60:22)…
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Sun Sep 26 14:30:24 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln111] SSH connection from [email protected](192.168.0.61:22) to [email protected](192.168.0.60:22) failed!
Sun Sep 26 14:30:25 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln63]
Sun Sep 26 14:30:24 2021 – [debug] Connecting via SSH from [email protected](192.168.0.62:22) to [email protected](192.168.0.60:22)…
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Sun Sep 26 14:30:25 2021 – [error][/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm, ln111] SSH connection from [email protected](192.168.0.62:22) to [email protected](192.168.0.60:22) failed!
SSH Configuration Check Failed!
at /bin/masterha_check_ssh line 44.
The solution is as follows.
-
- Manually check if the ssh communication between the three nodes is normal , use the format ssh node1 date, each node is executed three times, pay attention to the user who does the ssh communication, for example: I use mysql to do the mutual trust between the three nodes, then we have to switch to mysql to do the check, not the root user
-
- [mysql@slave1 .ssh]$ ssh master date
-
- Sun Sep 26 14:48:30 CST 2021
-
- [mysql@slave1 .ssh]$ ssh slave1 date
-
- Sun Sep 26 14:48:34 CST 2021
-
- [mysql@slave1 .ssh]$ ssh manager date
-
- Sun Sep 26 14:48:38 CST 2021 Use mysql user to execute mutual trust script check, check all ok
-
- Check script.
-
- masterha_check_ssh –global_conf=/etc/mha_master/mha.cnf –conf=/etc/mha_master/mha.cnf
-
-
- or
-
- masterha_check_ssh –conf=/etc/mha_master/mha.cnf
[mysql@manager .ssh]$ masterha_check_ssh –global_conf=/etc/mha_master/mha.cnf –conf=/etc/mha_master/mha.cnf
Sun Sep 26 14:29:30 2021 – [info] Reading default configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:29:30 2021 – [info] Reading application default configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:29:30 2021 – [info] Reading server configuration from /etc/mha_master/mha.cnf…
Sun Sep 26 14:29:30 2021 – [info] Starting SSH connection tests…
Sun Sep 26 14:29:31 2021 – [debug]
Sun Sep 26 14:29:30 2021 – [debug] Connecting via SSH from [email protected](192.168.0.60:22) to [email protected](192.168.0.61:22)…
Sun Sep 26 14:29:31 2021 – [debug] ok.
Sun Sep 26 14:29:31 2021 – [debug] Connecting via SSH from [email protected](192.168.0.60:22) to [email protected](192.168.0.62:22)…
Sun Sep 26 14:29:31 2021 – [debug] ok.
Sun Sep 26 14:29:32 2021 – [debug]
Sun Sep 26 14:29:31 2021 – [debug] Connecting via SSH from [email protected](192.168.0.61:22) to [email protected](192.168.0.60:22)…
Sun Sep 26 14:29:31 2021 – [debug] ok.
Sun Sep 26 14:29:31 2021 – [debug] Connecting via SSH from [email protected](192.168.0.61:22) to [email protected](192.168.0.62:22)…
Sun Sep 26 14:29:31 2021 – [debug] ok.
Sun Sep 26 14:29:33 2021 – [debug]
Sun Sep 26 14:29:31 2021 – [debug] Connecting via SSH from [email protected](192.168.0.62:22) to [email protected](192.168.0.60:22)…
Sun Sep 26 14:29:32 2021 – [debug] ok.
Sun Sep 26 14:29:32 2021 – [debug] Connecting via SSH from [email protected](192.168.0.62:22) to [email protected](192.168.0.61:22)…
Sun Sep 26 14:29:32 2021 – [debug] ok.
Sun Sep 26 14:29:33 2021 – [info] All SSH connection tests passed successfully.
3. If you use root to execute the script, it will report the theme error, remember to switch the user.
Read More:
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- [Solved] Error 1044: Access denied for user ‘syz-remote‘@‘%‘ to database ‘webapp‘
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- After installing mysql5.7 on centos7, an error 1045 (28000) is reported: access denied for user ‘root’ @’localhost ‘(using PAS)
- [Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘
- [Solved] Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- [Solved] mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this opera
- Mysqldump: Got error: 1045: Access denied for user ‘root‘@‘localhost‘
- [Solved] Worker 1 failed executing transaction ‘ANONYMOUS‘ at master log mall-mysql-bin.000001, end_log_pos
- [Solved] Mysql Build Error: [ERROR] Slave I/O for channel ‘‘: error connecting to master
- ERROR: mysqld failed while attempting to check config [How to Solve]
- ERROR 3021 (HY000): Unknown error 3021 [How to Solve]
- [Solved] Mongo Error: cant post the change to mongodb there is transaction error
- [Solved] ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
- Docker mysql8 modify password
- MySQL Error: errorCode 1130, state HY000 [How to Solve]
- [Solved] MYSQL Master-Slave slave I/o for channel, error_code 1045
- [Solved] Navicat Connect MySQL error: Authentication plugin ‘caching_sha2_password‘ cannot be loaded
- Hive install initialization error: Error: Duplicate key name ‘PCS_STATS_IDX‘ (state=42000,code=1061)
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution