Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 【急】生产环境通过 tiup cluster list 命令无法查看到集群信息,如何修复?
[TiDB Usage Environment] Production environment
[TiDB Version] Unknown
[Reproduction Path] Unable to connect remotely, encountered this issue when checking the server
[Encountered Problem: Problem Phenomenon and Impact] The cluster list returned by tiup cluster list is empty. Out of two TiDB instances, one can be connected to while the other cannot. After connecting, the database and tables can be viewed, but the data cannot be viewed.
Can the dashboard be opened to check the cluster status?
Are there only two TiDB servers? What does the topology look like?
Please provide the error message.
Check if the SSH connections between each node are functioning properly.
Check the server and network, 80% chance this is where the problem lies.
If it’s an issue with TiUP Meta data, consider backing up more frequently in the future;
If it’s an SSH issue, try recovering the public key from the TiUP Meta data directory.
First, identify which machine is the TiUP control machine, and then confirm which role is managing it. Sometimes the TiUP tool is installed on multiple machines, but only one is actually managing it, so the TiUP list on other machines cannot be seen.
The person above is right; it’s possible that your current server is not the control machine and just has the tiup command.
Check the situation in the .tiup folder under the home directory.
Check if the /home/tidb/.tiup file exists and if the ownership is correct.
Usually, two TiUP machines form a primary-backup relationship, and the /home/tidb/.tiup file from the primary machine is periodically copied to the /home/tidb/ directory on the backup machine.
First, we need to determine if the central control machine is the first.
How to achieve it with two TiDB servers…
Please clarify, this is not clear.
First, check the logs to find useful information, and you should provide the operating system, TiDB version information, and detailed information about the cluster.
Trace the command using strace
or sh -x
.
Is the server where the tiup cluster
command is located incorrect? Or is this command stored in a variable?
You can first check the TiDB Dashboard and Grafana to see if the cluster is functioning normally.