Issue with executing the /tmp/tiup/bin/insight script over SSH for xxx during environment check when installing and deploying TiDB using tiup

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 通过tiup安装部署tidb在check检查环境触发执行/tmp/tiup/bin/insight脚本execute command over SSH for xxx问题

| username: 波士顿小铁匠

When installing and deploying TiDB using tiup, an issue occurs during the environment check, triggering the execution of the /tmp/tiup/bin/insight script over SSH for xxx.

【TiDB Environment】 Pre-release environment
【TiDB Version】 6.5.2
【Operating System Version】 CentOS7.9 / Linux … 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
【Encountered Issue: Symptoms and Impact】
Deployment Environment Description:
(1) TiDB is deployed on only one node using tiup, and the control machine and the deployed service are on the same machine, with the domain name: node125.
(2) All TiDB services are deployed using a user called zhongtai.
(3) Before deploying tiup, the zhongtai user has been set to sudo without a password.
(4) Before deploying tiup, the node125 server has been configured for passwordless SSH login for the zhongtai user, i.e., executing ssh -p 22 zhongtai@node125 works normally.

【Attachments: Screenshots/Logs/Monitoring】


| username: 我是咖啡哥 | Original post link

Have you configured sudo?
Try executing this command manually to see if there are any errors?

| username: 波士顿小铁匠 | Original post link

Thanks for the reply, Coffee Brother.
① The password-free sudo for zhongtai has been configured, as shown in the picture below:


② The result of manual execution is as follows:

But I don’t know how to check the logs.

| username: 我是咖啡哥 | Original post link

Does the insight file exist?
127 indicates that the command was not found.

| username: 像风一样的男子 | Original post link

Has the zhongtai account set up passwordless SSH for its own server? It looks like what you’ve done is set up passwordless sudo after logging into the zhongtai account.

| username: 波士顿小铁匠 | Original post link

The insight file exists.

| username: 波士顿小铁匠 | Original post link

How should it be configured then?

| username: 像风一样的男子 | Original post link

TiDB users are configured in the configuration file.
When installing TiDB, you can use root to install it.
tiup cluster deploy ./topo.yaml --user root -p

| username: 波士顿小铁匠 | Original post link

Thank you. I’ll give it a try. If I have any questions, I’ll ask you again.

| username: 像风一样的男子 | Original post link

Check out this official quick start guide: TiDB 数据库快速上手指南 | PingCAP 文档中心

| username: 波士顿小铁匠 | Original post link

Buddy, I tried your method but it still doesn’t work. The error is as follows:

| username: 像风一样的男子 | Original post link

The root password is incorrect, right?

| username: Anna | Original post link

Try logging in and connecting to each other first.

| username: 波士顿小铁匠 | Original post link

Oh, it seems like this is a defect in this version. I reverted back to the zhongtai user. According to the official documentation, the steps should be tiup check → tiup check apply → tiup deploy → tiup start --init. Since I can’t get past tiup check right now, I skipped the check and check apply steps and directly executed tiup deploy → tiup start --init. This worked without any issues, effectively bypassing the problem.

This time, I deployed a single node with only one machine. Previously, I deployed on 7 machines, and when using tiup as the control node across multiple machines, some machines could pass the tiup check while others couldn’t. This indicates that the issue is intermittent. There are a few possible scenarios:

  1. There might be a minor bug in the tiup component in version v6.5.2.
  2. Observing the stack during deployment, I noticed it uses something called easyssh. It might be very sensitive to the version of the underlying sshd service on the operating system. This is just a guess from a novice user.
  3. According to the official documentation for v6.5.2, ssh_type can be configured to use the system’s own ssh, but even after trying this, the check still didn’t succeed. This might be because it’s an experimental feature.
| username: 波士顿小铁匠 | Original post link

Mutual login is normal.

| username: 波士顿小铁匠 | Original post link

I asked the operations team to help verify that the root password is correct.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.