I'm using embedded Tomcat server in Spring Tool Suite IDE. My problem is when I run my project there is an error as follows,
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.
There are some similar questions but none of the answers not working for me.
Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it drives traffic to the web server.
Solution 1: Kill Process
Run command-line as an Administrator
netstat -ano | findstr :<yourPortNumber>
taskkill /PID <typeyourPIDhere> /F
Solution 2: Change Port
Please Make sure that new port you are going to set for your Application doesn't listen to any other process
Change the port
server.port=8088 # Server HTTP port.
Solution 3: Another way is to terminate the process (in IDE) and clean and rebuild project.
UPDATE:
For solution 2, Please Make sure that new port you are going to set for your Application doesn't listen to any other process.
Option 1
Run resmon.exe
and go to Network -> Listening Port
(Also can be viewed on TaskManager)
Option 2
PowerShell
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess
cmd
C:\> netstat -a -b
(Add -n to stop it trying to resolve hostnames, which will make it a lot faster.)
-a
Displays all connections and listening ports.
-b
Displays the executable involved in creating each connection or listening port. In some cases, well-known executables host multiple independent components, and in these cases, the sequence of components involved in creating the connection or listening port is displayed. In this case, the executable name is in [] at the bottom, on top is the component it called, and so forth until TCP/IP was reached. Note that this option can be time-consuming and will fail unless you have sufficient permissions.
-n
Displays addresses and port numbers in numerical form.
-o
Displays the owning process ID associated with each connection.
I found that the answer by PatelRomil didn't work for me. I found that by running:
netstat -a -o -n
And getting the PID for the port, and then running:
taskkill /F /PID [PID]
Worked for me. Replace [PID]
with the value in the table from the previous command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With