Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 单机模拟集群报错timed out waiting for port 2379 to be started after 2m0s超时
[Test Environment] Testing environment
[TiDB Version] v7.1.0
[Issue: Phenomenon and Impact] Simulated single-machine deployment of production environment cluster in the testing environment. The cluster was successfully created, but an error occurred when starting the cluster. Error message: failed to start pd: failed to start: 10.120.141.212 pd-2379.service, please check the instance’s log(/data/tidb/tidb-deploy/pd-2379/log) for more detail.: timed out waiting for port 2379 to be started after 2m0s
[Attachments: Screenshots/Logs/Monitoring]
The PD log is empty, and the deployment log shows a timeout
Based on the error information you provided, it can be seen that the TiDB cluster failed to start due to the PD startup failure. You can troubleshoot by following these steps:
- Check the log files of the PD instance, located at
/data/tidb/tidb-deploy/pd-2379/log
, to see if there is more detailed error information.
- Check the configuration file of the PD instance, located at
/data/tidb/tidb-deploy/pd-2379/conf/pd.toml
, to ensure that the parameters in the configuration file are set correctly.
- Check if the port of the PD instance is occupied by using the command
netstat -tlnp | grep 2379
to view the port occupancy.
- Check if the PD instance process exists by using the command
ps -ef | grep pd
to view the process status.
- Check if the status of the PD instance is normal by using the command
systemctl status pd-2379.service
to view the service status.
You can go to the scripts directory under the PD directory and execute it manually to see if there are any obvious error messages.
I also encountered the same problem, ./scripts/run_pd.sh

Restart the machine
Run netstat -na | grep 2379
to check port usage.