tiunimanager安装过程中遇到的问题和解决方案

【 TiDB 使用环境】生产环境 【 TiDB 版本】6.1 【遇到的问题】 【复现路径】做过哪些操作出现的问题`
【问题现象及影响】
tidb的管理工具按照官方的教程部署下去会卡住
TiUniManager 安装和运维指南 | PingCAP Docs

现象如图
[root@jim ~]# TIUP_HOME=/home/tidb/.em tiup em deploy em-test v1.0.2 config.yaml -u root
tiup is checking updates for component em …
Starting component em: /home/tidb/.em/components/em/v1.0.2/tiup-em /home/tidb/.em/components/em/v1.0.2/tiup-em deploy em-test v1.0.2 config.yaml -u root
Please confirm your topology:
Cluster type: em
Cluster name: em-test
Cluster version: v1.0.2
Role Host Ports OS/Arch Directories


nginx 10.10.10.10 4180 linux/x86_64 /em-deploy/nginx-4180,/em-data/nginx-4180,
prometheus 10.10.10.10 4110 linux/x86_64 /em-deploy/prometheus-4110,/em-data/prometheus-4110,
grafana 10.10.10.10 4111 linux/x86_64 /em-deploy/grafana-4111,/em-data/grafana-4111
alertmanager 10.10.10.10 4112/4113 linux/x86_64 /em-deploy/alertmanager-4112,/em-data/alertmanager-4112,
jaeger 10.10.10.10 4114/4115/4116/4117/4118/4119/4120/4121/4122/4123 linux/x86_64 /em-deploy/jaeger-4114,/em-data/jaeger-4114,
cluster-server 10.10.10.10 4101/4104/4106/4107 linux/x86_64 /em-deploy/cluster-server-4101,/em-data/cluster-server-4101,
openapi-server 10.10.10.10 4100/4103 linux/x86_64 /em-deploy/openapi-server-4100,/em-data/openapi-server-4100,
file-server 10.10.10.10 4102/4105 linux/x86_64 /em-deploy/file-server-4102,/em-data/file-server-4102,
elasticsearch 10.10.10.10 4108 linux/x86_64 /em-deploy/elasticsearch-4108,/em-data/elasticsearch-4108,
filebeat 10.10.10.10 linux/x86_64 /em-deploy/filebeat-0,/em-data/filebeat-0,
kibana 10.10.10.10 4109 linux/x86_64 /em-deploy/kibana-4109,/em-data/kibana-4109,
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y

  • Generate SSH keys … Done
  • Download components
    • Download nginx: (linux/amd64) … Done
    • Download prometheus: (linux/amd64) … Done
    • Download grafana: (linux/amd64) … Done
    • Download alertmanager: (linux/amd64) … Done
    • Download jaeger: (linux/amd64) … Done
    • Download cluster-server:v1.0.2 (linux/amd64) … Done
    • Download openapi-server:v1.0.2 (linux/amd64) … Done
    • Download file-server:v1.0.2 (linux/amd64) … Done
    • Download elasticsearch: (linux/amd64) … Done
    • Download filebeat: (linux/amd64) … Done
    • Download kibana: (linux/amd64) … Done
    • Download node-exporter: (linux/amd64) … Done
  • Initialize target host environments
    • Prepare 10.10.10.10:22 … Done
  • Copy files
  • Copy files
  • Copy files
  • Copy files
  • Copy files
    • Copy nginx → 10.10.10.10 … ⠸ Mkdir: host=10.10.10.10, directories='/em-deploy/nginx-4…
    • Copy prometheus → 10.10.10.10 … ⠸ Mkdir: host=10.10.10.10, directories='/em-deploy/pr…
    • Copy grafana → 10.10.10.10 … ⠸ Mkdir: host=10.10.10.10, directories='/em-deploy/grafa…
    • Copy alertmanager → 10.10.10.10 … ⠸ Mkdir: host=10.10.10.10, directories='/em-deploy/…
    • Copy jaeger → 10.10.10.10 … ⠸ Mkdir: host=10.10.10.10, directories='/em-deploy/jaeger…

就一直在ssh 过不去。后来我发现他在创建tidb/.ssh目录 我就去那个目录删除了。教程就顺利安装成功了。

【报错部分及解决方案】

  • Prepare 10.10.10.10:22 … Error

Error: Failed to initialize TiDB environment on remote host ‘10.10.10.10’ (task.env_init.failed)
caused by: Failed to create ‘~/.ssh’ directory for user ‘tidb’
caused by: Failed to execute command over SSH for ‘tidb@10.10.10.10:22’
caused by: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Verbose debug logs has been written to /home/tidb/.em/logs/tiup-cluster-debug-2022-06-21-11-13-54.log.
[root@jim ~]# cd /home/tidb
[root@jim tidb]# ls
config.yaml em-cert em-repo
[root@jim tidb]# rm -rf .ssh
[root@jim tidb]# cd

请提供各个组件的 version 信息,如 cdc/tikv,可通过执行 cdc version/tikv-server --version 获取。

这个是之前手工配置过 ssh 吗?