Solve the problem of Web server failed to start. Port xxx was already in use. Port occupation

1. Background.

I started multiple projects today, but I didn't pay attention to the ports of the projects. As a result, the console printing port was occupied when I started it. I would like to record it here.

2. Solution.

1. Change to an unoccupied port and restart.

2. View the process of the occupied port.

netstat -aon|findstr 端口号

3. Find the process occupying this port according to the PID.

tasklist|findstr 端口号

4. End the process. 

taskkill /f /t /im 进程名

5. Complete.

3. Summary.

Record a little bit every day, and the accumulation is notes. 

Guess you like

Origin blog.csdn.net/weixin_42188778/article/details/126995184