tiup安装tidb错误现象:
+ Initialize target host environments
- Prepare 10.213.115.167:22 ... Error
- Prepare 10.213.115.45:22 ... Error
- Prepare 10.213.115.146:22 ... Error
Error: Failed to initialize TiDB environment on remote host '10.213.115.167' (task.env_init.failed)
caused by: Failed to create '~/.ssh' directory for user 'tidb'
caused by: Failed to execute command over SSH for 'tidb@10.213.115.167:22'
caused by: Process exited with status 1
Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2022-09-06-18-51-31.log.
Command output on remote host 10.213.115.167:
Password: su: Error in service module
后来经过摸索和日志分析,问题如下:
1,日志:/var/log/secure: auth could not identify password for tidb
2, tiup 输出重点:
Password: su: Error in service module
3,尝试了不少方法,这个有参考价值:pam_unix(sudo:auth):对话失败,auth无法识别[用户名]的密码 - IT宝库
4,临时解决方法:修改/etc/pam.d/su,文件第一行添加:
# Fixing ssh "auth could not identify password for [username]"
auth sufficient pam_permit.so