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

【 TiDB 使用环境】实验环境,操作系统为 openEuler 22.03 LTS
【 TiDB 版本】TiDB v6.1.0、TiUniManager 1.0.1
【遇到的问题】

  1. 执行以下命令部署 TiUniManager 时报错 ssh: handshake failed
~]$ TIUP_HOME=/home/tidb/.em tiup em deploy em-test 1.0.1 config.yaml -u tidb -p

报错信息如下:

+ 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. 换成命令:
~]$ TIUP_HOME=/home/tidb/.em tiup em deploy em-test ${version} config.yaml -u tidb -i .ssh/id_rsa

报错信息如下:

- 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. 直接执行如下命令,都是成功的
~]$ ssh tidb@192.168.3.220 -c "test -d /em-deploy || mkdir -p /em-deploy && chown tidb:$(id -g -n tidb) /em-deploy"

以下命令,可确认免密互信没问题

~]$ 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

免密通过如下方式设置:

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

集群拓扑如下(192.168.3.220是中控主机,部署tiup、TiUniManager、br等组件),以上有关TiUniManager 的部署命令也都是在192.168.3.220中控主机中执行:

补充debug报错日志文件
tiup-cluster-debug-2022-10-13-22-04-39.log (169.7 KB)

em-deploy 目录已成功创建,应该是卡在sftp传文件步骤了。

[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

重新做下这步即可
cp /home/tidb/.ssh/id_rsa /home/tidb/.ssh/tiup_rsa

做了这步了。

已解决,需要修改 TiEM 中控机(本例为 192.168.3.220 )的sshd配置,具体如下:

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

~]# systemctl restart sshd

很奇怪,部署 TiDB 6.1.0 无需调整 sshd 配置,即可成功部署完成。
而部署 TiEM 却需要增加 ssh-rsa。

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。