tiup cluster deploy 安装失败


错误提示

Error: Failed to initialize TiDB environment on remote host ‘192.168.111.221’ (task.env_init.failed)
caused by: Failed to create new system user ‘tidb_db’ on remote host
caused by: Failed to execute command over SSH for ‘root@192.168.111.221:22’
caused by: Process exited with status 127

目标机器上的

image

image

文件权限也 正常 744 600

最下方报错提示 ”bash: sudo : command not found“ ,请检查下目标机器上是否已安装 sudo

Error: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb_db@192.168.111.221:22’ {ssh_stderr: We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/usr/bin:/usr/sbin sudo -H bash -c “test -d /tidb-deploy || (mkdir -p /tidb-deploy && chown tidb_db:$(id -g -n tidb_db) /tidb-deploy)”}, cause: Process exited with status 1

Verbose debug logs has been written to /root/logs/tiup-cluster-debug-2020-11-22-00-40-07.log.
Error: run /root/.tiup/components/cluster/v1.2.4/tiup-cluster (wd:/root/.tiup/data/SH2tMiC) failed: exit status 1

现在报了这个错误

image

tidb_db 这个账户的 免密登录也配置正常

麻烦再检查下 /etc/sudoers 里权限是否也设置成功了。

ok 解决了 非常感谢

:+1::+1::+1:

麻烦问问,权限是怎么设置的。我也遇到了相同的问题

这类权限相关的帖子很多,麻烦先根据报错关键字搜索一下,若搜索不到请重新开贴提问,谢谢。

感觉应该是这里的权限设置