tidp部署4.0.8 Failed to create '~/.ssh' directory for user 'work'

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:

【TiDB 版本】
4.0.8

【问题描述】
离线tiup部署4.0.8版本tidb
问题:
中控机 创建用户 work并配置ssh互信执行 tiup cluster deploy tidb-test v4.0.8 topology.yaml --user work 部署集群报异常:
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]: y

  • Generate SSH keys … Done
  • Download TiDB components
    • Download pd:v4.0.8 (linux/amd64) … Done
    • Download tikv:v4.0.8 (linux/amd64) … Done
    • Download tidb:v4.0.8 (linux/amd64) … Done
    • Download tiflash:v4.0.8 (linux/amd64) … Done
    • Download cdc:v4.0.8 (linux/amd64) … Done
    • Download prometheus:v4.0.8 (linux/amd64) … Done
    • Download grafana:v4.0.8 (linux/amd64) … Done
    • Download alertmanager:v0.17.0 (linux/amd64) … Done
    • Download node_exporter:v0.17.0 (linux/amd64) … Done
    • Download blackbox_exporter:v0.12.0 (linux/amd64) … Done
  • Initialize target host environments
    • Prepare 10.49.12.7:22 … Error
    • Prepare 10.132.50.4:22 … Error
    • Prepare 10.132.46.6:22 … Error

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

  1. tiup cluster deploy tidb-test v4.0.8 topology.yaml --user work --ssh system 看看能否执行成功。
  2. 如果报错的话 通过 tiup cluster audit | head -15 把对应的那个 deploy 命令的 audit id 找到。
  3. tiup cluster audit <id> > audit.log 提供一下 audit.log ,进行分析。

问一下,
1、你这个10.49.12.7就是中控机机器嘛?
2、如果10.49.12.7做中控机的话,这么操作了嘛?

10.49.12.7 不是中控机,中控机是没有部署组件的一台机器。
部署的几台机器已经配置了互信,必须使用10.0.1.1这个ip重新配置互信才可以吗?

中控机与这些机器也配置互信了嘛

使用tiup cluster deploy tidb-test v4.0.8 topology.yaml --user work --ssh system这种方式可以部署成功,请问是什么原因呢

配置了,按照这种方式tiup cluster deploy tidb-test v4.0.8 topology.yaml --user work --ssh system就可以了,不太清楚什么原因。

主要是 ssh 的 client 不一样。
https://docs.pingcap.com/zh/tidb/stable/tiup-component-cluster#--ssh-string默认-builtin

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