Offline Deployment of TiUniManager 1.0.1 Error: ssh: handshake failed

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 离线部署 TiUniManager 1.0.1 报错 ssh: handshake failed

| username: OnTheRoad

【TiDB Usage Environment】Experimental environment, operating system is openEuler 22.03 LTS
【TiDB Version】TiDB v6.1.0, TiUniManager 1.0.1
【Encountered Problem】

  1. Error ssh: handshake failed when executing the following command to deploy TiUniManager.
~]$ TIUP_HOME=/home/tidb/.em tiup em deploy em-test 1.0.1 config.yaml -u tidb -p

Error message:

+ Copy files
  - Copy nginx -> 192.168.3.220 ... Error
  - Copy prometheus -> 192.168.3.220 ... Error
  - Copy grafana -> 192.168.3.220 ... Error
  - Copy alertmanager -> 192.168.3.220 ... Error
  - Copy jaeger -> 192.168.3.220 ... Error
  - Copy cluster-server -> 192.168.3.220 ... Error
  - Copy openapi-server -> 192.168.3.220 ... Error
  - Copy file-server -> 192.168.3.220 ... Error
  - Copy elasticsearch -> 192.168.3.220 ... Error
  - Copy filebeat -> 192.168.3.220 ... Error
  - Copy kibana -> 192.168.3.220 ... Error
  - Copy node-exporter -> 192.168.3.220 ... Error

Error: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@192.168.3.220:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "test -d /em-deploy || (mkdir -p /em-deploy && chown tidb:$(id -g -n tidb) /em-deploy)"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
  1. Changed to the command:
~]$ TIUP_HOME=/home/tidb/.em tiup em deploy em-test ${version} config.yaml -u tidb -i .ssh/id_rsa

Error message:

- Prepare 192.168.3.220:22 ... Error

Error: Failed to initialize TiDB environment on remote host '192.168.3.220' (task.env_init.failed)
  caused by: Failed to create '~/.ssh' directory for user 'tidb'
    caused by: Failed to execute command over SSH for 'tidb@192.168.3.220:22'
      caused by: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
  1. Directly executing the following commands are successful:
~]$ ssh tidb@192.168.3.220 -c "test -d /em-deploy || mkdir -p /em-deploy && chown tidb:$(id -g -n tidb) /em-deploy"

The following command confirms that passwordless SSH is working:

~]$ ssh tidb@192.168.3.220 date

Authorized users only. All activities may be monitored and reported.
Thu Oct 13 04:09:05 PM CST 2022

Passwordless SSH was set up as follows:

~]$ ssh-keygen -t rsa
~]$ ssh-copy-id tidb@192.168.3.220

Cluster topology is as follows (192.168.3.220 is the control host, deploying tiup, TiUniManager, br, etc. components). The above deployment commands for TiUniManager are also executed on the control host 192.168.3.220:

Supplementary debug error log file
tiup-cluster-debug-2022-10-13-22-04-39.log (169.7 KB)

The em-deploy directory has been successfully created, it seems to be stuck at the sftp file transfer step.

[tidb@localhost ~]$ tree /em-deploy
/em-deploy
0 directories, 0 files
[tidb@localhost ~]$ ls -l / |grep em
drwxr-xr-x    4 root root   4096 Oct 13 21:52 em-data
drwxr-xr-x    2 tidb tidb   4096 Oct 13 21:59 em-deploy
| username: gary | Original post link

Just redo this step:
cp /home/tidb/.ssh/id_rsa /home/tidb/.ssh/tiup_rsa

| username: OnTheRoad | Original post link

I have done this step.

| username: OnTheRoad | Original post link

Problem solved. The sshd configuration on the TiEM control machine (in this case, 192.168.3.220) needs to be modified as follows:

~]# echo PubkeyAcceptedKeyTypes=+ssh-rsa >>/etc/ssh/sshd_config

~]# systemctl restart sshd

Interestingly, deploying TiDB 6.1.0 does not require adjusting the sshd configuration to successfully complete the deployment. However, deploying TiEM requires adding ssh-rsa.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.