|2020-10-20T16:59:26.788+0800|ERROR|SSHCommand|{“host”: “172.25.111.194”, “port”: “2222”, “cmd”: “export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H bash -c “id -u tidb > /dev/null 2>&1 || (/usr/sbin/groupadd -f tidb && /usr/sbin/useradd -m -s /bin/bash -g tidb 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-10-20T16:59:26.788+0800|DEBUG|TaskFinish|{“task”: “EnvInit: user=tidb, host=172.25.111.194”, “error”: “task.env_init.failed: Failed to initialize TiDB environment on remote host ‘172.25.111.194’, 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 ‘ser@172.25.111.194:2222’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H bash -c “id -u tidb > /dev/null 2>&1 || (/usr/sbin/groupadd -f tidb && /usr/sbin/useradd -m -s /bin/bash -g tidb 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 ‘172.25.111.194’, 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 ‘ser@172.25.111.194:2222’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H bash -c “id -u tidb > /dev/null 2>&1 || (/usr/sbin/groupadd -f tidb && /usr/sbin/useradd -m -s /bin/bash -g tidb 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\
at github.com/pingcap/tiup/pkg/cluster/executor.(*EasySSHExecutor).Execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/executor/ssh.go:153\
at github.com/pingcap/tiup/pkg/cluster/module.(*UserModule).Execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/module/user.go:126\
at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:67\
at github.com/pingcap/tiup/pkg/cluster/task.(*EnvInit).Execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/task/env_init.go:46\
at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:191\
at github.com/pingcap/tiup/pkg/cluster/task.(*StepDisplay).Execute()\
\tgithub.com/pingcap/tiup@/pkg/cluster/task/step.go:85\
at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1()\
\tgithub.com/pingcap/tiup@/pkg/cluster/task/task.go:236\
at runtime.goexit()\
\truntime/asm_amd64.s:1357”}|
以上是报错日志,从日志看是ssh 免密登录失败或者没有创建tidb用户导致的。
实际上免密登录没有问题 tidb用户也没有问题。
因为上周我用同样的机器、同样的命令、同样的配置文件,安装了 4.0.6 版本的tidb集群,并且安装成功了,今天我清理掉4.0.6的版本 想安装4.0.0的版本看下,结果报这个错误,现在想重新安装4.0.6版本也会报这个错误。
安装方式是使用tiup 离线安装的,执行命令为:
tiup cluster deploy tidb-test v4.0.6 complex-mini-test.yaml -user tidb
tiup cluster deploy tidb-test v4.0.0 complex-mini-test.yaml -user tidb
配置文件正确识别拓扑:
Cluster type: tidb
Cluster name: tidb-test
Cluster version: v4.0.6
Type Host Ports OS/Arch Directories
pd 172.25.111.194 2379/2380 linux/x86_64 /data1/tidb-deploy/pd-2379,/data1/tidb-data/pd-2379
tikv 172.25.111.191 20160/20180 linux/x86_64 /data1/tidb-deploy/tikv-20160,/data1/tidb-data/tikv-20160
tikv 172.25.111.192 20160/20180 linux/x86_64 /data1/tidb-deploy/tikv-20160,/data1/tidb-data/tikv-20160
tikv 172.25.111.193 20160/20180 linux/x86_64 /data1/tidb-deploy/tikv-20160,/data1/tidb-data/tikv-20160
tidb 172.25.111.194 4000/10080 linux/x86_64 /data1/tidb-deploy/tidb-4000
tiflash 172.25.111.195 9000/8123/3930/20170/20292/8234 linux/x86_64 /data1/tidb-deploy/tiflash-9000,/data1/tidb-data/tiflash-9000
prometheus 172.25.111.194 9090 linux/x86_64 /data1/tidb-deploy/prometheus-8249,/data1/tidb-data/prometheus-8249
grafana 172.25.111.194 3000 linux/x86_64 /data1/tidb-deploy/grafana-3000
alertmanager 172.25.111.194 9093/9094 linux/x86_64 /data1/tidb-deploy/alertmanager,/data1/tidb-data/alertmanager