Netsat-ano viewing occupied ports and Tomcat ports being accounted for or boot failure issues

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.