2

I am using Ubuntu 12.10, and in Eclipse I've to run the PHP scripts and C/C++ codes, but when I am starting synchronization of tomcat 7 server it shows the error as,

"Several ports (8005, 8080) required by Tomcat v7.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 do I fix it? Please help me..

Aaron
  • 6,714
Vikas Agrawal
  • 33
  • 1
  • 1
  • 4

2 Answers2

3

You may already to be running a tomcat instance already.

ps aux | grep tomcat

Check what appears. If there is nothing then it must be another service you will need to netstat to check what services are running on port 8080

netstat -an

This command will show you the service. Look for anything on 8080 already.

The last option is the one given above. Jump into either the http or tomcat configs and switch the ports to stop any problems when launching. the server.xml file contains the config that needs changed.

<!-- Normal HTTP -->
 <Connector className="org.apache.tomcat.service.PoolTcpConnector">
    <Parameter name="handler" 
         value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
     <Parameter name="port" 
         value="8080"/>
 </Connector>

8081 is my suggestion for changing the ports keep it simple.

Thanks

William

LinuxBill
  • 2,067
0

From the Tomcat-Apache documentation: http://tomcat.apache.org/tomcat-3.2-doc/tomcat-apache-howto.html#error_no_apache

This most likely means that Tomcat is trying to use a port that is already being used by someone else - usually Apache or another instance of Tomcat. By default, Tomcat's comes configured to run an HTTP server on port 8080. If you examine the supplied server.xml file, you'll see the following element:

 <!-- Normal HTTP -->
 <Connector className="org.apache.tomcat.service.PoolTcpConnector">
    <Parameter name="handler" 
         value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
     <Parameter name="port" 
         value="8080"/>
 </Connector>

You should be able to alter that port number to have Tomcat run on a different port for HTTP. Check the same file for configuration using port 8005, as well.

Aaron
  • 6,714