3
votes

I just started the tomcat and opened my browser and gave http://localhost:8080. But i found 404 error. I tried running the same in eclipse i got the following error message.

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).

What could be the problem?

3

3 Answers

4
votes

I just started the tomcat and opened my browser and gave http://localhost:8080. But i found 404 error.

Tomcat runs fine, but there was nothing to serve on the given URL. There's no ROOT webapp anywhere or there's no welcome file. You need to either deploy a webapp or let the URL point to a valid resource.

I tried running the same in eclipse i got the following error message.

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).

A port can be used only once by only one application at time. This indicates that you haven't shutdown the first instance of Tomcat before you run the one in Eclipse which is apparently been configured to listen on same ports.

2
votes

If you are using windows, probably tomcat is running as a service.

Control Panel -> Administrative Tools -> Services -> Find Apache Tomcat 6

Right Click and choose properties

Startup Type : change it to manual, and hit the stop button.

click, ok and close all windows.

You can now run tomcat from eclipse IDE without changing the ports.

-1
votes

Just go and kill the javaw process.