Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of port 8080 being occupied when starting Tomcat application server

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "how to solve the problem of port 8080 being occupied when starting Tomcat application server". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Preface

When we start the Tomcat application server to run the project, if we don't shut down the Tomcat server correctly last time, or if port 8080 is occupied by a process in the system, and we don't know which process is occupying the port we are using. Then we can use the Shell command to see the usage and shut down the processes that occupy the port.

1. Tomcat application server port 8080 is occupied

We can now see that the error is as follows:

Several ports (8005, 8080, 8009) required by Tomcat V9.0 Server at Localhost are already in use

Obviously, ports 8005, 8080, and 8009 are occupied.

Second, how to solve the problem that the port is occupied

Open the Windows command interface as an administrator and perform the following steps.

2.1. List the usage of all ports

List the usage of all ports, as follows:

Netstat-ano

2.2. View the PID corresponding to the occupied port

Check the PID corresponding to the occupied port and enter the following command:

Netstat-ano | findstr "port number"

For example, port 8080 is:

Netstat-ano | findstr 80802.3. Enter to check the specific program that occupies the port.

At this point we can see the PID that occupies the process.

Enter the following command:

Tasklist | findstr "PID"

For example, let's take a look at the above process with a PID of 1788. The code is as follows:

Tasklist | findstr 1788

We can see that it is the Wechat process that occupies the destination port, as shown in the following figure:

2.4. End the destination process

At this time, we have to terminate the process of Wechat in order to run the project, as follows:

This is the end of taskkill/WeChat.exe 's "how to solve the problem of port 8080 being occupied when starting Tomcat application server". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report