Single-node simulated cluster error: timed out waiting for port 2379 to start after 2m0s timeout

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超时

| username: xiaotiaop

[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

| username: Billmay表妹 | Original post link

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:

  1. 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.
  2. 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.
  3. Check if the port of the PD instance is occupied by using the command netstat -tlnp | grep 2379 to view the port occupancy.
  4. Check if the PD instance process exists by using the command ps -ef | grep pd to view the process status.
  5. Check if the status of the PD instance is normal by using the command systemctl status pd-2379.service to view the service status.
| username: xiaotiaop | Original post link

  1. No error messages in the logs
  2. PD configuration is correct and auto-generated
  3. No port occupation
  4. No processes
  5. Service shows dead
    Startup still fails
| username: Anna | Original post link

You are awesome, cousin.

| username: Ming | Original post link

You can go to the scripts directory under the PD directory and execute it manually to see if there are any obvious error messages.

| username: TiDBer_9dE4XfyA | Original post link

I also encountered the same problem, ./scripts/run_pd.sh

1715056866935

| username: zhanggame1 | Original post link

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