Windows system resolver port number is occupied
Table of contents
I have read a lot of information when I encountered this problem, I think these are not very good, and it is a bit long-winded. I have tried many methods and think this method is faster. If there is something wrong, please leave a message and discuss, I hope it can help everyone.
2. Problem description
When we usually develop, especially when using idea development, because idea can only allow one program to run, we often see an error as shown in the figure:
Extract useful information: Connector configured to listen on port “port number” failed to start
Meaning: A connector configured to [listen] on port xxxx failed to start
Then look at the log error:
Meaning: The Tomcat connector configured to listen on port 8888 failed to start. The port may already be in use, or the connector may be misconfigured.
This way we know where the problem is, our port number is occupied .
3. Solve the problem
To solve the problem of port number being occupied, when I first came into contact with the program, there were very few methods, but I just knew that our port number must be occupied by other programs. It was very simple and rude at the time, and restarted directly , but with the workload in the future More and more I feel that this method is not advisable, and then start to try some methods, and finally come to the conclusion.
3.1 Shortcut key win+r Enter cmd+Enter
Open the “big blackboard”
3.2 View the PID corresponding to the occupied port
Enter the command in the window:
netstat -aon|findstr "xxxx"
3.3 End the process
Force (/F parameter) to kill all processes with pid 21516 including child processes (/T parameter):
taskkill /T /F /PID xxxxx
3.4 Go to our development tool to restart the program for verification
Program start completed