内网扩容PD节点失败

【TiDB 使用环境】测试
【TiDB 版本】v5.4.1
【操作系统】 centos7
【部署方式】机器部署(
【集群数据量】
【集群节点数】tidb:1,pd:1,tikv:3
操作及报错日志:
./bin/tiup cluster scale-out tidb_cluster_iap scala-out-pd-95-12379.yml --user xxxx
tiup is checking updates for component cluster …
A new version of cluster is available:
The latest version: v1.16.1
Local installed version: v1.9.6
Update current component: tiup update cluster
Update all components: tiup update --all

Starting component cluster: /data/home/xxxx/.tiup/components/cluster/v1.9.6/tiup-cluster /data/home/xxxx/.tiup/components/cluster/v1.9.6/tiup-cluster scale-out tidb_cluster_iap scala-out-pd-95-12379.yml --user xxxx
Please confirm your topology:
Cluster type: tidb
Cluster name: tidb_cluster_iap
Cluster version: v5.4.1
Role Host Ports OS/Arch Directories


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]: (default=N) y

  • [ Serial ] - SSHKeySet: privateKey=/data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/ssh/id_rsa, publicKey=/data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/ssh/id_rsa.pub
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • [Parallel] - UserSSH: user=xxxx, host=192.168.66.66
  • Download TiDB components
  • Initialize target host environments
  • Deploy TiDB instance
  • Copy certificate to remote host
  • Generate scale-out config
  • Init monitor config
  • Check status
    Enabling component node_exporter
    Enabling component blackbox_exporter
  • [ Serial ] - Save meta
  • [ Serial ] - Start new instances
    Starting component node_exporter
    Starting component blackbox_exporter
  • Refresh components conifgs
    • Generate config pd → 192.168.66.66:2379 … Error
    • Generate config tikv → 192.168.66.66:20160 … Error
    • Generate config tikv → 192.168.66.66:20161 … Error
    • Generate config tikv → 192.168.66.66:20162 … Error
    • Generate config tidb → 192.168.66.66:4000 … Error
    • Generate config prometheus → 192.168.66.66:9090 … Error
    • Generate config grafana → 192.168.66.66:3000 … Error

Error: init config failed: 192.168.66.66:20161: transfer from /data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/config-cache/tikv-192.168.66.66-20161.service to /tmp/tikv_81673729-e2f7-4550-bc1a-ff8dbd13c8f8.service failed: failed to scp /data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/config-cache/tikv-192.168.66.66-20161.service to xxxx@192.168.66.66:/tmp/tikv_81673729-e2f7-4550-bc1a-ff8dbd13c8f8.service: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

这个scp的命令执行失败了,原因是

unable to authenticate, attempted methods [none publickey], no supported methods remain

这个user xxxx互信没做好。

看看下面这个。

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

1 个赞

不想做免密的话,加个-p先手工输入下密码

1 个赞

互信有问题

我手动scp一个文件能成功,什么原因呢

不用输入密码吗

第一是ssh,两边都用root和tidb账号 都免密ssh一下,要么就输密码。还有,pd扩容最好直接扩容2个,需要3个,要不然pd只有2个节点,他怎么仲裁判断谁为主呢。

ssh -vvv -i /data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/ssh/id_rsa xxxx@192.168.66.66

这个试过了正常么?
如果不正常,确认下
/data/home/xxxx/.tiup/storage/cluster/clusters/tidb_cluster_iap/ssh/id_rsa 这个文件用户是否为xxxx跟权限是否为600,
也检查下192.168.66.66这个机器的xxxx用户下的.ssh/authorized_keys文件是否为600,.ssh是否为700。

1 个赞

手动指定一下秘钥 -uxxx -i 指定当前秘钥~/.ssh下的路径

1 个赞

互信有问题!

直接加-p指定秘密,比较简单点

./bin/tiup cluster scale-out tidb_cluster_iap scala-out-pd-95-12379.yml --user xxxx -p //直接指定-p手工输入密码,试一下