aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Several ports required by Tomcat v5.5 Server at localhost are already in use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Several ports required by Tomcat v5.5 Server at localhost are already in use" Watch "Several ports required by Tomcat v5.5 Server at localhost are already in use" New topic
Author

Several ports required by Tomcat v5.5 Server at localhost are already in use

vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
I am getting below error on starting the tomcat server configured into Eclipse:

Several ports (8005, 8080, 8009) required by Tomcat v5.5 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).

Surprisingly, I can run tomcat server from outside the Eclipse environment on port 8080!

I tried following steps to resolve the issue, but none helps:

>> I run http://localhost:8080/ url in browser to test the server running on the port. But, page not found for 8005, 8080, and 8009 ports. It means these ports are not in use.

>> then i changed the port no. in server.xml file; still was getting the same error on starting the server.

>> then i restarted my machine. and still am getting the same error on running tomcat from eclipse.

>> i deleted and clean the current tomcat server configured into eclipse. but still no progress.

Please help me in resolving the issue.
Mary Nicholle
Greenhorn

Joined: Feb 20, 2010
Posts: 2
Good afternoon

I too have the same problem so I am hoping someone could detail what to look for to stop the "other process" which the server is suppose to be running.

Thanks Mary Nicholle
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
page not found for 8005, 8080, and 8009 ports. It means these ports are not in use.


Alas that is incorrect. Ports such as 8005 are used for control and "page not found" probably means the browser reached a HTTP server but the rest of the URL didn't point to a page the server could resolve. I say probably because if you have Microsoft Explorer "friendly HTTP error messages" turned on, it hard to say for sure what is wrong.

This kind of problem is why I hesitate to use an IDE for servlet development.

Bill
Mary Nicholle
Greenhorn

Joined: Feb 20, 2010
Posts: 2
Hi Bill

Thanks for the feedback

When I tried the localhost:8080 I got the Apache Tomcat home page which meant a successful setup of Tomcat.

Any other suggestions out there? Really need the help

Laters

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
1. Looking for the default Tomcat startup was a good start so you know Tomcat is running.
2. The next thing to do is to find out if Tomcat recognizes your web application URL at all. The servlet API is very specific about the directory structure required and where various resources go. If there is an error in the web.xml deployment descriptor Tomcat won't treat your directory as an application, so check the logs from when Tomcat starts up for an error report.

Did you install Tomcat as a service or as an application?
How are you starting Tomcat?
Are we still talking about an Eclipse development environment?

Bill
William Stafford
Ranch Hand

Joined: Dec 13, 2004
Posts: 109
I'm getting the same error message when trying to start Tomcat 6 from Eclipse Galileo. However, if I start Tomcat with the startup command in <CATALINA_HOME>/bin it starts up normally with no complaints.

Is this an Eclipse or Tomcat (or both) issue?

-=b
vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
William Brogden wrote:

Did you install Tomcat as a service or as an application?
How are you starting Tomcat?
Are we still talking about an Eclipse development environment?

Bill


i downloaded tomcat 5.5 from the internet and configure it into eclipse using create new web application wizard.

in my first post, i forgot to mention an important thing. i had formatted my C drive last week and downloaded & installed java 6 on my machine. when i ran the tomcat server first time, some process asked to access an internet site but i declined it without going into details. From then its continuously showing the "Several ports required by Tomcat v5.5 Server at localhost are already in use" error. I s it possible that some virus might not allowing me to run tomcat inside eclipse. But I have Mcaffe anti-virus installed. Please suggest.

Before formatting, I was able to run tomcat server inside eclipse.

Nalin Chhibber
Greenhorn

Joined: May 07, 2012
Posts: 1
The error means the same what it says,
"you cannot run 2 instances of server on the same port".
in this case,it can be another project of yours that might have used tomcat previously and hasn't leaved it yet.

solution:
# if you are not sure if your port are currently being used ,
*either visit the link http://localhost:8080/ on your browser.If you get to the
server's homepage or see a typical 404 error,
your connetion is being used.
*or simply type the command netstat -a in terminal(linux) or command
prompt(windows)
it'll list down all the ports open/listening on your machine.

# once you get to know that the port you want to use is already in use,
*either shutdown the system(which will automatically free the ports) //bad option
*or change the ports 8001,8080,8009 from server.xml file
//u'll find it inside /conf directory of tomcat folder.
*or traverse to the place where you have installed your Apache Tomcat
go to /bin folder and execute the shutdown.bat file(windows) or shutdown.sh
file(Linux).it'll close your server and thus freeing the ports which were in use

open eclipse again and restart the server

regards,
Nalin_C
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Several ports required by Tomcat v5.5 Server at localhost are already in use