Port 8080 is already in use in eclipse
I am trying to run the Spring MVC demo file on Eclipse oxygen , when I click the start button like> run on server it shows the following error after a moment
Port 8080 required by Tomcat v8.5 The server on localhost is already in use. The server may be running in a different process, or the system process may be using the port. To start this server you need to stop another process or change port numbers
source to share
The process is already listening on port 8080 and you cannot listen to multiple processes on the same port.
You have two options :
-
Kill an existing process if it is not useful
netstat -tulpn | grep :8080
-
Change the application port. In your applications .properties and file add this line
server.port=8081
source to share
Step 1: (open 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
source to share