I am trying to run a Spring MVC demo file on Eclipse oxygen when I hit the button run as> run on server it shows the following error after a moment
Port 8080 required by Tomcat v8.5 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)
Step 1: (open the CMD command)
C:\Users\username>netstat -o -n -a | findstr 0.0:8080
TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 3116
Now , we can see that LISTENING port is 3116 for 8080 ,
We need to kill 3116 now
Step 2:-
C:\Users\username>taskkill /F /PID 3116
Step 3: Go to Eclipse and start Server , it will run
OR
you can change port number in folder servers>Tomcat>server.xml
A process is already listening on port 8080 and you can't have more than one process listening on the same port.
You have two options :
Kill the existing process if it's not usefull
netstat -tulpn | grep :8080
Change you application port. In your application.properties and file add this line server.port=8081
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