I'm getting the following error when I try to run a simple JSP program on Tomcat in Eclipse.
Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are 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).
How is this caused and how can I solve it?
If you are running on windows try this in the command line prompt:
This will show all ports in use and the process id PID # of the process that is using that port. Then Ctrl+Alt+Del and open Task Manager to see which process is that.
You can then choose either to close/stop it or configure your server to use another port. To check if the new choosen port (let's say 8010) is available do this:
If it does not return any lines then you are fine.
To change the port go to the Server view, open server.xml and change the port there. Mine has this entry:
I have no another instance of Tomcat running ad no other process using "Tomcat port" (in my case, the 8088 port). Eclipse send the same message on starting Tomcat:
....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).
I solve the problem in this way:
If you use Eclipse then double click on servers and double click on tomcat server then one file will open. In that file change HTTP port to some other port number and save(Ctrl+S) then again start the server.
Step 1: netstat -a -o -n and it will bring up a network list,search for the local address like 127.0.0.1:8080 and note the PID (eq 3624)
Step2 : taskkill /F /PID 3624 . Run this command to kill that process.
link to post
Your Tomcat is probably running already. That's why you have got an error. I've had the same problem before. I solved it very simply:
That's all.
The simpler fix that works for me is deleting my current deployed webapps from tomcat through the "Server" tab. Once I remove them the problem goes away. Simply re-deploy your project by going on Run As > Run on Server.