【 TiDB 使用环境】实验环境,操作系统为 openEuler 22.03 LTS
【 TiDB 版本】TiDB v6.1.0、TiUniManager 1.0.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
- 换成命令:
~]$ 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
- 直接执行如下命令,都是成功的
~]$ 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