1. Find the program/process that occupies the port
Quote
View the process pid occupying the port Check
netstat -ano |findstr "端口号"
the corresponding program name according to the process PID
tasklist |findstr "进程id号"
Check the command that the process runs through The
wmic process where processid=8236 get commandline
parameter is the process PID
Kill the process
taskkill /f /t /im "进程ID或者进程名称"
Check the usage list of all ports
netstat -ano
If it is caused by tomcat, the solution:
https://jingyan.baidu.com/article/59703552a7d2a48fc107406b.html
1. Start the command window of windows
Shortcut key windows+R, then enter cmd in the input box, click OK to start the command window;
2. Find a specific port
Enter the command in the command window and enter netstat -ano |findstr "port number", then press Enter, you can see which program the port is occupied by
Example: netstat -ano |findstr "62001", note that the quotation marks of the English input method are used here;
3. Find the process name corresponding to the port number
Use the command tasklist |findstr "process id number",
Example: tasklist |findstr "15936", note that the quotation marks of the English input method are used here;
4. Find the usage list of all port numbers
Enter the command netstat -ano and press Enter, you can see the usage list of all ports currently starting the application.
5. Kill the process
Enter taskkill /f /t /im "process ID or process name" in the command box,
Example: taskkill /f /t /im "15936", note that the quotation marks of the English input method are used here;
Or taskkill /f /t /im "nox_adb.exe", note here that the quotation marks of the English input method are used;