Solve the port occupation under the window

Enter the command: netstat -ano to list the status of all ports. In the list we observe the occupied port, such as 8005, and find it first.

To view the PID corresponding to the occupied port, enter the command: netstat -aon|findstr "8005", press Enter, and write down the last digit, that is, the PID, here is 6020.

Continue to enter tasklist|findstr "6020", press Enter, and check which process or program occupies port 6020;

 taskkill /pid 6020 can kill the thread 6020, so that port 8005 will not be occupied.

 If you still can't kill it, you can use the forced kill command; taskkill /f /pid 6020

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324920041&siteId=291194637