执行tiup cluster start tidb-test --init 命令启动tidb集群报错

初始化集群的时候报错

【TiDB 使用环境】 /测试环境
【TiDB 版本】v6.5.12
【部署方式】云上部署(阿里云)/机器部署

【集群数据量】
【集群节点数】
【遇到的问题:问题现象及影响】
【复制黏贴 ERROR 报错的日志】
Error: failed to start tikv: failed to start: 192.168.10.183 tikv-20160.service, please check the instance’s log(/data/tidb-deploy/tikv-20160/log) for more detail.: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.10.183:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin; /usr/bin/sudo -H bash -c “systemctl daemon-reload && systemctl start tikv-20160.service”}, cause: ssh: handshake failed: EOF
【其他附件:截图/日志/监控】

你从中控机手动执行ssh tidb@xxx 看能不能连接过去

看这个报错,问题不在TiDB本身,而是SSH连接失败了。ssh: handshake failed: EOF 说明tiup无法通过SSH连到192.168.10.183。

建议按以下顺序排查:

  1. 先手动SSH测试连通性
ssh tidb@192.168.10.183

如果连不上,检查安全组/防火墙是否放行了22端口,以及tidb用户的SSH密钥是否配置正确。

  • 清空 tidb 用户下 .ssh 旧密钥,整套重新做免密登录;
  • 关闭节点 firewalld、selinux 临时测试;
  • 若仅单台 tikv 主机故障,其余节点正常,问题 100% 锁定在该 ECS 的 SSH 密钥或者内网安全策略。

ssh handshake failed: EOF 是到该节点 SSH 不通或中断。先本机 ssh tidb@192.168.10.183 验证密钥/端口/防火墙;看 tikv 实例日志确认是否进程起不来。修好连通后再 start,不要只盯 --init。