tiup Error: failed to stop alertmanager: failed to stop: xx.xx.xx.xx alertmanager-9093.service

报错信息:
Error: failed to stop alertmanager: failed to stop: 192.168.100.1 alertmanager-9093.service, please check the instance’s log(/home/data/tidb-deploy/alertmanager-9093/log) for more detail.: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.100.1: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 stop alertmanager-9093.service”}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

报错原因:
ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

解决方法:

  1. 查看当前tiup部署时存放的私钥位置 tiup cluster list
[root@localhost .tiup]# tiup cluster list
tiup is checking updates for component cluster ...
Starting component `cluster`: /root/.tiup/components/cluster/v1.12.2/tiup-cluster list
Name       User  Version  Path                                            PrivateKey
----       ----  -------  ----                                            ----------
tidb-test  tidb  v7.1.0   /root/.tiup/storage/cluster/clusters/tidb-test  /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa

私钥目录存放在 /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa

  1. 将tiup用户目录下的私钥覆盖至此处即可(如果没有则需要手动ssh-gen下,网上大部分都是教到这里,但还是不解决问题,一般都是visudo然后添加tidb用户权限,生成公钥私钥)
su - tidb
cd .ssh 
cp id_rsa /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa
cp authorized_keys /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa.pub

这里的关键点是覆盖你安装时指定的私钥目录文件,大部分教程都没提及此处。

  1. tiup cluster reload --ssh system tidb-test

完事~~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值