A. Under DOS command: Enter netstat-ano--carriage return, you can see the occupied port, note the PID of the port, then open Task Manager, point to view, select the column, check the PID to find the corresponding PID, end the process, if it is not finished or after the end does not work, Just use the NTSD command .
DOS command Window input Netstat-ano to view port usage, if you want to see whether the specified port is occupied can use the command netstat-ano|findstr port number, for example, to see whether the 8080 port number is already occupied by using the command netstat- ANO|FINDSTR 8080 If the result is empty, the description is not used, and if there is a value then it is already in use, and the last column is the process ID using the 8080 port number.
1. Use the ntsd-c q-p pid command to kill the process that occupies the port, where the PID is the process number that occupies the port,
2.tskill command kill process is also a choice tasklist can list all the processes and the corresponding information. Taskill can kill processes based on the PID (process ID) process name.
The port number you found in the previous step, or you can use the taskkill/pid PID command to kill the process. {taskkill/pid + the process number you want to kill}
Use TASKLIST/FI "pid eq 5764" command to view process number corresponding to process information
Tomcat Port Occupancy workaround
If the front-end port is not occupied and is later occupied, you can go to the D:\tomcat-5.5.26\bin to execute shutdown.bat, so that the occupied port is released
NTSD cannot kill the process: only System,SMSS. EXE and CSRSS. EXE cannot kill. The first two are pure kernel state, the last one is the WIN32 subsystem, NTSD itself needs it.
B. When the tomcat port is accounted for, you can use the above method to kill the process number
When this occurs, it is likely that the Web. xml file was incorrectly written , as follows:
Netsat-ano viewing occupied ports and Tomcat ports being accounted for or boot failure issues