执行部署命令时报错

Error: failed to fetch cpu arch: executor.ssh.execute_failed: Failed to execute command over SSH for ‘root@174.24.15.2:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin uname -m}, cause: dial tcp 174.24.15.2:22: i/o timeout

TIDB小白,求大神详细告知

2 个赞

切换到tidb用户,执行部署命令试试

使用普通用户登录中控机,以 tidb 用户为例,后续安装 TiUP 及集群管理操作均通过该用户完成。

或者尝试手工配置互信
https://docs.pingcap.com/zh/tidb/stable/check-before-deployment#手动配置-ssh-互信及-sudo-免密码

2 个赞

1、看下网络是不是通的,端口是不是通的
2、yaml文件发出来看一下

2 个赞

请描述一下部署的环境,是否单机部署,ssh是否安装并可以正常通信

是单机部署

修改配置
vim /etc/ssh/sshd_config
注释这一行 PermitRootLogin prohibit-password
添加一行 PermitRootLogin yes
重启ssh服务
/etc/init.d/ssh restart

这样操作试试

# bal variables are applied to all deployments and used as the default value of

# the deployments if a specific deployment value is missing.

global:
user: “tidb”
ssh_port: 22
deploy_dir: “/tidb-deploy”
data_dir: “/tidb-data”

# Monitored variables are applied to all the machines.

monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115

server_configs:
tidb:
log.slow-threshold: 300
tikv:
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
pd:
replication.enable-placement-rules: true
replication.location-labels: [“host”]
tiflash:
logger.level: “info”

pd_servers:

  • host: 174.24.15.2

tidb_servers:

  • host: 174.24.15.2

tikv_servers:

  • host: 174.24.15.2
    port: 20160
    status_port: 20180
    config:
    server.labels: { host: “174.24.15.2” }

  • host: 174.24.15.2
    port: 20161
    status_port: 20181
    config:
    server.labels: { host: “174.24.15.2” }

  • host: 174.24.15.2
    port: 20162
    status_port: 20182
    config:
    server.labels: { host: “174.24.15.2” }

tiflash_servers:

  • host: 174.24.15.2

monitoring_servers:

  • host: 174.24.15.2

grafana_servers:

  • host: 174.24.15.2
1 个赞

这个方法我试过还是不行

根据报错还是建议检查ssh方面的问题。另外,你用的操作系统是什么版本的?
对了,还可以尝试升级一下tiup的版本

我发现用tidb登陆后 用ssh 连接地址的时候超时,这个是什么原因

1 个赞

可能ssh有地方没设置好。
其实ssh的问题有两种方式,
1.tiup可以自动创建tidb用户,并建立ssh互信进行部署
2.手动创建tidb用户,手动建立互信,部署的时候 --user 记得指向tidb用户,或者-i 指向互信的文件,就可以部署成功

1 个赞

Error: failed to fetch cpu arch: executor.ssh.execute_failed: Failed to execute command over SSH for ‘root@174.24.15.2:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin uname -m}, cause: dial tcp 174.24.15.2:22: i/o timeout

2 个赞

手工设置互信,建议参考官方文档进行操作
https://docs.pingcap.com/zh/tidb/stable/check-before-deployment#手动配置-ssh-互信及-sudo-免密码

2 个赞

需要配置互信免密:也可以在/etc/sudoers文件最后面加上,这样的写法,使用sodo权限不需要密码验证。
tidb ALL=(ALL) NOPASSWD: ALL

1 个赞

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