Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Port 8080 already in use in eclipse

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)

like image 245
Mr. A Avatar asked Aug 05 '17 10:08

Mr. A


2 Answers

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
like image 134
chethu Avatar answered Oct 13 '22 19:10

chethu


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 :

  1. Kill the existing process if it's not usefull netstat -tulpn | grep :8080

  2. Change you application port. In your application.properties and file add this line server.port=8081

like image 20
Martin Choraine Avatar answered Oct 13 '22 17:10

Martin Choraine