Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tiup找不到集群
[TiDB Usage Environment] Production Environment
[TiDB Version] v6.0.0
[Reproduction Path] Log in to the CentOS Alibaba Cloud host as a regular user, and use tiup cluster list
to view the running cluster but nothing is shown.
[Encountered Problem: Phenomenon and Impact] The database is currently deployed in a single-machine mode and is running in the production environment without errors. However, to lift the 6MB limit, the configuration file needs to be modified. But since tiup cluster list
does not show the running cluster, it cannot be restarted. I asked the operations personnel who deployed it, but they were clueless. Seeking advice from experts here.
[Resource Configuration] SSH mutual trust has been configured on the local machine.
[Attachments: Screenshots/Logs/Monitoring]
Additional: It was not deployed by the root user, and the topology.yaml is configured for this user. Using the root user to check tiup cluster list
results in the following error:
Additional: Another strange thing is that the configuration file is not in standard YAML format. The file is as follows:
Does the root user not have it either? Check the history records with history.
It seems that this user deployed it. If it wasn’t this user, it should report an error saying “command not found.” Can you check if there are any other users and try each user one by one?
Switch to the tidb user and take a look.
Check if there are corresponding files in the error path. If not, follow the instructions to reset the mirror using tiup mirror set
.
Could it be that there is no connection to the external network?
The external network is closed, unable to connect to https://tiup-mirrors.pingcap.com
Is there a permission to see which user’s home directory the .tiup directory is under?
which tiup
Then check if there is a ./storage/cluster/clusters/tidb-test/meta.yaml file in the .tiup directory.
Understood. Please provide the Chinese text you would like translated into English.
Normally, after deploying with tiup, a .tiup directory will be created in the home directory of the deployment user, and the cluster information will be recorded in it. If the current user can use tiup but no cluster is displayed, it is possible that you are using the wrong user and need to find the correct user. Alternatively, there might be an issue with the cluster information, but the probability of that is relatively low.
Could it be that the contents under .tiup were manually cleaned up?
Or is this machine not the control machine?
Check if there are folders in this directory?
/home/sunbox/.tiup/storage/cluster/clusters/
Although this machine has tiup deployed, it may not be the control machine.
Solution: Locate the cluster’s configuration file and redeploy it. However, do not start it. It’s equivalent to migrating the control machine once.
I think it might be like this.