Mr. A
Mr. A

Reputation: 103

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)

Upvotes: 6

Views: 36138

Answers (10)

SripriyaPKulkarni
SripriyaPKulkarni

Reputation: 9

Followed below steps and was able to solve the issue:

C:\Users\Sri Priya P Kulkarni>netstat -o -n -a | findstr 0.0:8080 TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 13196

C:\Users\Sri Priya P Kulkarni>taskkill /F /PID 13196 SUCCESS: The process with PID 13196 has been terminated.

Upvotes: 0

mango
mango

Reputation: 1

My method is to run tomcat7w.exe to disable it. (Only Stopping it is not enough). And my Kaspersky (Anti virus) generate some new rules for eclipse and java.

Upvotes: 0

Kerelos
Kerelos

Reputation: 103

I face the same problem and after searching the answer as shown below: 1. open Monitor Tomcat as shown below:

enter image description here

  1. Simply press stop as shown in below picture:

enter image description here

Finally it works with me after many trials and suggested solutions.

Best Regards, Kerelos Mikhail

Upvotes: 0

jenvi
jenvi

Reputation: 1

you can go in servers > server.xml.in server.xml file u should changes like, step 1) step 2) step 3) <Connector port="8010" protocol="AJP/1.3" redirectPort="8443"/> and save the changes .

Upvotes: -1

Chandra shekhar
Chandra shekhar

Reputation: 26

Always Kill the process before deploying your war file in tomcat

ps -A|grep tomcat It will list all tomcat process. Note Down the PID and run

KILL <PID>

Cross check by ps -A|grep tomcat

Upvotes: 0

chethu
chethu

Reputation: 353

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

Upvotes: 8

Udyan Sharma
Udyan Sharma

Reputation: 134

You can just change the default port of your Tomcat server if the problem persists.

Upvotes: 0

Martin Choraine
Martin Choraine

Reputation: 2431

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

Upvotes: 1

Dilip D
Dilip D

Reputation: 565

please kill the java process from task manager if windows, else if linux system kill -9 tomcat

Upvotes: 0

Herelo
Herelo

Reputation: 119

in your apache conf folder, open the httpd file and look for 8080 port. Change 8080 to any port you like. I believe you will find 8080 on two places

Upvotes: 0

Related Questions