Tag Archives: JAVA_ Problem summary

[Solved] Web server failed to start. Port 8080 was already in use.

Problem Description:

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.

Method 1: turn off the process occupying port 8080

    1. 1. keyboard input (Win + R), then enter “cmd” in the run dialog box, enter the command window
  1. 2. enter netstat -ano|findstr “8080”, and press Enter, as shown in the following screenshot:

3. Then enter tasklist|findstr “3516” and press enter to get the process occupying port 8080

4. Open the “task manager”, locate the change process, and then end the process. The occupation of port 8080 is cancelled

Or close with the command: taskkill -PID 3516 -F

Method 2: modify the configuration file and use other available ports

We can modify the port number in application.yml configuration file, as shown below:

View port, process and end process on Linux system

  a,Check port occupancy
    netstat -nap|grep 8080
  b,View port occupied processes
     ps -aux |grep 27672
   c,End a process
    kill -9 pid

Error running ‘Tomcat 8.5.31’: Unable to open debugger port

This problem indicates that a port occupies the current port. For example, if you want to start tomact, but a tomact service has been started, an error will be reported

Shows the details of 8068 port occupation

netstat -ano | findstr "8080"

 

 

Query which application occupies the port (according to PID)

tasklist | findstr "20344"

Force kill specified port (according to PID)

taskkill /pid 13800 -t -f

You can also close the process according to the program name

taskkill /f /t /im java.exe