【 TiDB 使用环境】测试环境
【 TiDB 版本】5.4.0
【遇到的问题】按照文档–>快速上手TIDB–> 在单机上模拟部署生产环境集群 的指引,在部署集群时报错
【问题现象及影响】
执行tiup cluster deploy test v5.4.0 ./topo.yaml --user root -p命令时报错:
Input SSH password:
- Detect CPU Arch
- Detecting node 172.20.1.95 … Error
Error: failed to fetch cpu arch: executor.ssh.execute_failed: Failed to execute command over SSH for ‘root@172.20.1.xx:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin uname -m}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
1 个赞
张雨齐0720
(Zhangjig)
2
handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
根据错误信息看,怎么像是授权问题啊,密码没有问题吧?
1 个赞
你试试这样操作,修改配置
vim /etc/ssh/sshd_config
注释这一行 PermitRootLogin prohibit-password
添加一行 PermitRootLogin yes
重启ssh服务
/etc/init.d/ssh restart
然后去部署就行了
2 个赞
你好啊老哥,我按照你的办法设置了,但是还是不行,一样的问题
1 个赞
密码没问题的,就是本机root的密码,我是按照文档里说的在单机环境进行测试的。
1 个赞
部署的机器是amd64架构的吗,检查一下拓扑文件中的配置和机器cpu架构是否一致
1 个赞
xfworld
(魔幻之翼)
9
互信其实很麻烦的,没按照操作来的话,
以下的文档都能参考
https://docs.pingcap.com/zh/tidb/stable/check-before-deployment#手动配置-ssh-互信及-sudo-免密码
ssh互信配置
试下这个
tiup cluster deploy tets v5.4.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]
谢谢老哥回复我这么多,我这个是单机环境模拟集群进行测试,看着文档是可以用-p并输入密码连接的,结果还是要在单机环境也配置互信么
xfworld
(魔幻之翼)
12
tiup 的命令和检查,都是固定的,必须了
建议还是用 虚拟机的方式来体验了,尽量用配置好点的
如果只是想试用一下, tidb Cloud 也是可以免费试用的
还是不行,已经可以从tidb用户无密码登录root,但是错误还是没变
边城元元
(边城元元)
14
先check用下
tiup cluster check ./topo.yaml --user root -p
你要配一下root 到 root@172.20.1.42 的互信 也就是自己到自己的互信
使用root 执行 ssh root@172.20.1.42 如果可以免密了应该就没啥问题了
MaxSessions最大数量配置了吗?
echo 'MaxSessions=40' >> /etc/ssh/sshd_config
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
systemctl restart sshd
单机模拟集群,最好也检查一下
安装之前先check一下,查看是否有什么地方配置不正确,如果有fail处,再次check一下,可以修复部分fail,直到没有fail为止
[root@PD ~]# tiup cluster check ./topology.yaml --apply --user root -p
tiup is checking updates for component cluster ...
Starting component `cluster`: /root/.tiup/components/cluster/v1.9.0/tiup-cluster /root/.tiup/components/cluster/v1.9.0/tiup-cluster check ./topology.yaml --apply --user root -p
Input SSH password:
+ Detect CPU Arch
- Detecting node 192.168.80.10 ... Done
- Detecting node 192.168.80.11 ... Done
- Detecting node 192.168.80.12 ... Done
- Detecting node 192.168.80.13 ... Done
...