Port 8080 already in use in eclipse

Viewed 29430

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)

10 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

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

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

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.

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.

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 .

Related