tidb4.0.0扩容tikv出现的问题:ssh: unable to authenticate, attempted methods [none publickey]

前提:tidb版本为4.0.0现有的服务器都是CentOS Linux release 7.6.1810 (Core)

准备扩容一台KV,但是新的服务器操作系统为CentOS Linux release 8.2.2004 (Core)

在执行扩容的时候出现如下报错,我这边该如何解决,从什么地方差找。
比较急,今天晚上需要添加,多谢!

[tidb@29 ~]$ cat scale-out.yaml
tikv_servers:
  - host: 172.168.192.40

[tidb@29 ~]$ tiup cluster scale-out test-cluster scale-out.yaml
Starting component `cluster`:  scale-out test-cluster scale-out.yaml
Please confirm your topology:
TiDB Cluster: test-cluster
TiDB Version: v4.0.0
Type  Host            Ports        OS/Arch       Directories
----  ----            -----        -------       -----------
tikv  172.168.192.40  20160/20180  linux/x86_64  deploy/tikv-20160,data
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]:  y
+ [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa.pub


  - Download blackbox_exporter:v0.12.0 (linux/amd64) ... Done
+ [ Serial ] - RootSSH: user=tidb, host=172.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa
+ [ Serial ] - EnvInit: user=tidb, host=172.168.192.40

Error: Failed to initialize TiDB environment on remote host '172.168.192.40' (task.env_init.failed)
  caused by: Failed to create new system user 'tidb' on remote host
    caused by: Failed to execute command over SSH for 'tidb@172.168.192.40:22'
      caused by: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Verbose debug logs has been written to /home/tidb/logs/tiup-cluster-debug-2020-07-29-15-58-29.log.
Error: run `` (wd:/home/tidb/.tiup/data/S67BAUX) failed: exit status 1

你好,
从报错判断应该是中控机和扩容服务器 ssh 互信的问题,可以确认下中控机的 tidb 在 扩容服务器上是否可以免密登录并且具有 sudo 权限

中控机执行:
ssh tidb@172.168.192.40
登录成功后执行
sudo su -
看是否可以,否则需要将 /home/tidb/.ssh/id_rsa.pub 复制到扩容服务器对应的 authorized_keys 中,并配置 sudo 免密权限,具体可以搜一下。

如果中控服务器和扩容服务器 root 密码相同,可以使用如下命令进行部署,会提示输入 ssh key
tiup cluster scale-out test-cluster scale-out.yaml --user root

是可以的:

[tidb@29 ~]$ ssh root@172.168.192.40
root@172.168.192.40's password:
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Wed Jul 29 16:23:11 2020 from 172.168.181.58
[root@dev40 ~]# sudo su -
上一次登录:三 7月 29 16:41:58 CST 2020从 172.168.181.58pts/1 上
[root@40 ~]#

相关日志

[tidb@29 ~]$ tail -1000f /home/tidb/logs/tiup-cluster-debug-2020-07-29-15-58-29.log
2020-07-29T15:58:09.663+0800    INFO    Execute command {"command": "tiup cluster scale-out test-cluster scale-out.yaml"}
2020-07-29T15:58:09.663+0800    DEBUG   Environment variables   {"env": ["TIUP_HOME=/home/tidb/.tiup", "TIUP_WORK_DIR=/home/tidb", "TIUP_INSTANCE_DATA_DIR=/home/tidb/.tiup/data/S67BAUX", "TIUP_COMPONENT_DATA_DIR=/home/tidb/.tiup/storage/cluster", "TIUP_COMPONENT_INSTALL_DIR=/home/tidb/.tiup/components/cluster/v1.0.8", "TIUP_TELEMETRY_STATUS=enable", "TIUP_TELEMETRY_UUID=ae6a8fbd-539d-41ec-b059-cdb26cb44262", "TIUP_TAG=S67BAUX", "XDG_SESSION_ID=2875", "HOSTNAME=dev29", "SELINUX_ROLE_REQUESTED=", "TERM=xterm", "SHELL=/bin/bash", "HISTSIZE=4000", "SSH_CLIENT=172.16.26.149 55923 22", "SELINUX_USE_CURRENT_RANGE=", "OLDPWD=/home/tidb/tidb-ansible", "SSH_TTY=/dev/pts/0", "USER=tidb", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:", "MAIL=/var/spool/mail/tidb", "PATH=/home/tidb/.tiup/bin:/home/tidb/.tiup/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/tidb/.local/bin:/home/tidb/bin:/home/tidb/.local/bin:/home/tidb/bin", "PWD=/home/tidb", "LANG=zh_CN.UTF-8", "SELINUX_LEVEL_REQUESTED=", "HISTCONTROL=ignoredups", "SHLVL=1", "HOME=/home/tidb", "LOGNAME=tidb", "SSH_CONNECTION=172.16.26.149 55923 177.168.181.58 22", "LESSOPEN=||/usr/bin/lesspipe.sh %s", "XDG_RUNTIME_DIR=/run/user/1000", "HISTTIMEFORMAT=%F %T 172.16.26.149 tidb ", "_=/home/tidb/.tiup/bin/tiup", "TIUP_MIRRORS=https://tiup-mirrors.pingcap.com"]}
2020-07-29T15:58:09.667+0800    DEBUG   Parse topology file     {"file": "scale-out.yaml"}
2020-07-29T15:58:09.667+0800    DEBUG   Parse topology file succeeded   {"topology": {"GlobalOptions":{"User":"tidb","SSHPort":22,"DeployDir":"deploy","DataDir":"data","LogDir":"","ResourceControl":{"MemoryLimit":"","CPUQuota":"","IOReadBandwidthMax":"","IOWriteBandwidthMax":""},"OS":"linux","Arch":"amd64"},"MonitoredOptions":{"NodeExporterPort":9100,"BlackboxExporterPort":9115,"DeployDir":"deploy/monitor-9100","DataDir":"data/monitor-9100","LogDir":"deploy/monitor-9100/log","NumaNode":"","ResourceControl":{"MemoryLimit":"","CPUQuota":"","IOReadBandwidthMax":"","IOWriteBandwidthMax":""}},"ServerConfigs":{"TiDB":{"log.file.max-days":10,"log.query-log-max-len":6000,"max-index-length":12288,"mem-quota-query":1073741824,"oom-action":"log"},"TiKV":{},"PD":{},"TiFlash":{},"TiFlashLearner":{},"Pump":{},"Drainer":{},"CDC":{}},"TiDBServers":null,"TiKVServers":[{"Host":"177.168.192.40","ListenHost":"","SSHPort":22,"Imported":false,"Port":20160,"StatusPort":20180,"DeployDir":"deploy/tikv-20160","DataDir":"data","LogDir":"","Offline":false,"NumaNode":"","Config":null,"ResourceControl":{"MemoryLimit":"","CPUQuota":"","IOReadBandwidthMax":"","IOWriteBandwidthMax":""},"Arch":"amd64","OS":"linux"}],"TiFlashServers":null,"PDServers":null,"PumpServers":null,"Drainers":null,"CDCServers":null,"Monitors":null,"Grafana":null,"Alertmanager":null}}
2020-07-29T15:58:09.668+0800    INFO    Please confirm your topology:
2020-07-29T15:58:09.668+0800    WARN    Attention:
2020-07-29T15:58:09.668+0800    WARN        1. If the topology is not what you expected, check your yaml file.
2020-07-29T15:58:09.668+0800    WARN        2. Please confirm there is no port/directory conflicts in same host.
2020-07-29T15:58:26.689+0800    INFO    + [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa.pub
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa.pub"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskFinish      {"task": "SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/test-cluster/ssh/id_rsa.pub"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64\nDownload: component=node_exporter, version=v0.17.0, os=linux, arch=amd64\nDownload: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=node_exporter, version=v0.17.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.689+0800    DEBUG   TaskBegin       {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64"}
2020-07-29T15:58:26.690+0800    DEBUG   TaskBegin       {"task": "Download: component=node_exporter, version=v0.17.0, os=linux, arch=amd64"}
2020-07-29T15:58:27.816+0800    DEBUG   TaskFinish      {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64"}
2020-07-29T15:58:27.816+0800    DEBUG   TaskFinish      {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.583+0800    DEBUG   TaskFinish      {"task": "Download: component=node_exporter, version=v0.17.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.583+0800    DEBUG   TaskFinish      {"task": "Download: component=node_exporter, version=v0.17.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskFinish      {"task": "Download: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskFinish      {"task": "Download: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskFinish      {"task": "Download: component=tikv, version=v4.0.0, os=linux, arch=amd64\nDownload: component=node_exporter, version=v0.17.0, os=linux, arch=amd64\nDownload: component=blackbox_exporter, version=v0.12.0, os=linux, arch=amd64"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskBegin       {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa\nEnvInit: user=tidb, host=177.168.192.40\nMkdir: host=177.168.192.40, directories='/home/tidb/deploy','/home/tidb/data'"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskBegin       {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa\nEnvInit: user=tidb, host=177.168.192.40\nMkdir: host=177.168.192.40, directories='/home/tidb/deploy','/home/tidb/data'"}
2020-07-29T15:58:29.657+0800    INFO    + [ Serial ] - RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa
2020-07-29T15:58:29.657+0800    DEBUG   TaskBegin       {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa"}
2020-07-29T15:58:29.657+0800    DEBUG   TaskFinish      {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa"}
2020-07-29T15:58:29.657+0800    INFO    + [ Serial ] - EnvInit: user=tidb, host=177.168.192.40
2020-07-29T15:58:29.657+0800    DEBUG   TaskBegin       {"task": "EnvInit: user=tidb, host=177.168.192.40"}
2020-07-29T15:58:29.699+0800    INFO    SSHCommand      {"host": "177.168.192.40", "port": "22", "cmd": "export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"", "error": "ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "stdout": "", "stderr": ""}
2020-07-29T15:58:29.699+0800    DEBUG   TaskFinish      {"task": "EnvInit: user=tidb, host=177.168.192.40", "error": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "errorVerbose": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n at github.com/pingcap/tiup/pkg/cluster/executor.(*SSHExecutor).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/executor/ssh.go:156\n at github.com/pingcap/tiup/pkg/cluster/module.(*UserModule).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/module/user.go:114\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:63\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:44\n at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:189\n at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:242\n at runtime.goexit()\n\truntime/asm_amd64.s:1357"}
2020-07-29T15:58:29.699+0800    DEBUG   TaskFinish      {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa\nEnvInit: user=tidb, host=177.168.192.40\nMkdir: host=177.168.192.40, directories='/home/tidb/deploy','/home/tidb/data'", "error": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "errorVerbose": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n at github.com/pingcap/tiup/pkg/cluster/executor.(*SSHExecutor).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/executor/ssh.go:156\n at github.com/pingcap/tiup/pkg/cluster/module.(*UserModule).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/module/user.go:114\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:63\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:44\n at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:189\n at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:242\n at runtime.goexit()\n\truntime/asm_amd64.s:1357"}
2020-07-29T15:58:29.699+0800    DEBUG   TaskFinish      {"task": "RootSSH: user=tidb, host=177.168.192.40, port=22, key=/home/tidb/.ssh/id_rsa\nEnvInit: user=tidb, host=177.168.192.40\nMkdir: host=177.168.192.40, directories='/home/tidb/deploy','/home/tidb/data'", "error": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "errorVerbose": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n at github.com/pingcap/tiup/pkg/cluster/executor.(*SSHExecutor).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/executor/ssh.go:156\n at github.com/pingcap/tiup/pkg/cluster/module.(*UserModule).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/module/user.go:114\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:63\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:44\n at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:189\n at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:242\n at runtime.goexit()\n\truntime/asm_amd64.s:1357"}
2020-07-29T15:58:29.699+0800    INFO    Execute command finished        {"code": 1, "error": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain", "errorVerbose": "task.env_init.failed: Failed to initialize TiDB environment on remote host '177.168.192.40', cause: module.user.user_add_failed: Failed to create new system user 'tidb' on remote host, cause: executor.ssh.execute_failed: Failed to execute command over SSH for 'tidb@177.168.192.40:22' {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H -u root bash -c \"id -u tidb > /dev/null 2>&1 || /usr/sbin/useradd -m -s /bin/bash tidb && echo 'tidb ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tidb\"}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain\n at github.com/pingcap/tiup/pkg/cluster/executor.(*SSHExecutor).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/executor/ssh.go:156\n at github.com/pingcap/tiup/pkg/cluster/module.(*UserModule).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/module/user.go:114\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:63\n at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:44\n at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:189\n at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1()\n\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:242\n at runtime.goexit()\n\truntime/asm_amd64.s:1357"}




辛苦确认下这个 ip 是否在集群中,与172.168.192.40并不相符

这边需要验证的是 tidb 用户哦,不是 root 用户,

177.168.192.40
172.168.192.40
这两个是一个ip我改错了:joy:

ssh tidb@172.168.192.40 连接不上, 172.168.192.40上没有tidb用户

似的,scale-out 类似 deploy 操作,用户方便可以参照下 deploy 的文档,上面也说了如果 root 密码相同部署可能会方便些,当前问题清晰了吧

ok我试下tiup cluster scale-out test-cluster scale-out.yaml --user root

我之前用3.0.11版本的tidb扩容
ansible-playbook -i hosts.ini deploy_ntp.yml -u tidb -b
报如下错误
No match for argument: python2-dnf

先关注下当前问题吧,

tidb-ansible 应该是依赖的问题,按照文档将 ansible 的前置安装包先重新安装下

hi
请问,scale out 问题是否已经解决

系统统一换成centos7了就没问题了:joy:

嗯嗯, 可能是操作系统某些包安装存在差异 ~~

sorry,一楼忽略了到 centos 的信息,下次开帖辛苦将信息之类的另起一个段落,方便查看

好的辛苦了

:rofl:,我看到了,,,有问题开新帖继续讨论吧

:sweat_smile:好嘞,找到原因了4.0.0扩容新的服务器,需要提前创建用户并ssh互信

ok,部署用户需要提前设置权限。有问题欢迎开新帖继续讨论