Solution to tomcat startup port occupation

Source: Internet
Author: User

The article will tell you how to solve the problem of tomcat startup port occupation. For more information, see. Sqlserver/42852.htm target = _ blank>

I just keep going to shutdown tomcat and then go to the task manager to kill the process. This is usually useful, but recently I learned a more scientific method as follows:

The first step is to check which process is using the following command:


Netstat-ano | more

 

Step 2: Find the process that uses the following command:


Tasklist | more


Step 3: Shut down the application.

 

Appendix:
 

NETSTAT [-a] [-B] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v]

-A displays all connection and listening ports.

-B shows the executable components that contain each connection or listening port. Executable components are known in some cases

Multiple independent components are available. In these cases, the component sequence that includes creating a connection or listening port is displayed.

In this case, the executable component name is in the [] at the bottom, and the component called by the component is at the top until TCP/IP

. Note that this option may take a long time and may fail if you do not have sufficient permissions.

-E displays Ethernet statistics. This option can be combined with the-s option

-N: the address and port number are displayed in numbers. This option can be used in combination with-

-O displays the ID of the process associated with each connection.

-P proto shows the connection of the Protocol specified by proto; proto can be

One of the following protocols: TCP, UDP, TCPv6, or UDPv6.

If used with the-s option to display statistics by Protocol, proto can be one of the following protocols:

IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.

-R shows the route table.

-S displays statistics by protocol. By default, the IP address,

Statistics of IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;

The-p option is used to specify the default subset.

When used together with option-B, components that contain connection or listening ports are displayed for All executable components.

Interval re-displays the selected statistics.

Pause interval (in seconds ). Press CTRL + C to stop and restart

Displays statistics. If omitted, netstat displays the current

 

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.