[Resolved After Resetting All Systems and Redeploying] Error: Deploy port conflicts to an existing cluster (spec.deploy.port_conflict) - Port still occupied after reinstalling the operating system and deploying the TiDB cluster

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

Original topic: 【重置所有系统后重新部署解决了】Error: Deploy port conflicts to an existing cluster (spec.deploy.port_conflict) 重新安装完操作系统后,部署TiDB集群依然报端口被占用

| username: 大炮的TiDB

【TiDB Environment】Test environment
【TiDB Version】v5.4
【Encountered Problem】
[tidb@dapao ~]$ tiup cluster check ./topology.yaml --user root
tiup is checking updates for component cluster …
Starting component cluster: /home/tidb/.tiup/components/cluster/v1.10.2/tiup-cluster check ./topology.yaml --user root

Error: Deploy port conflicts to an existing cluster (spec.deploy.port_conflict)

The port you specified in the topology file is:
Port: 2379
Component: pd 123.14.226.212

It conflicts with a port in the existing cluster:
Existing Cluster Name: tidb-test
Existing Port: 2379
Existing Component: pd 123.14.226.212

Please change to use another port or another host.
【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
Previously, a TiDB cluster was installed. When upgrading TiDB, an error was reported. At that time, I didn’t want to solve it and directly recreated it. Currently, my operating system has been reset, but it prompts that port 2379 of one of the nodes is already occupied? After resetting the operating system and redeploying the TiDB cluster, it shouldn’t still be occupied.

| username: Meditator | Original post link

Reinstall the OS, only reinstall the system disk, some directory files on the data disk are still there, follow the prompts to find and clean them up.

| username: 大炮的TiDB | Original post link

Thank you for the reply. I checked, and there is no directory like /tidb-deploy/pd-2379 on my server.

| username: 大炮的TiDB | Original post link

The link you provided appears to be an image. Please provide the text content you need translated.

| username: Meditator | Original post link

Then use netstat or ss to see who is occupying the port.

| username: Raymond | Original post link

Execute netstat -lntp | grep 'port' as the root user to find the corresponding PID, then kill the PID.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.