2

I got this error just after getting an Ubuntu error with eclipse and it forced to close the program.

Several ports (8005, 8080, 8009) 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).

I got that error even after stopping manually the server

$> sudo /etc/init.d/tomcat7 stop
 * Stopping Tomcat servlet engine tomcat7                                [ OK ]

$> sudo /etc/init.d/tomcat7 status
 * Tomcat servlet engine is not running.

What could I do without having to reboot the computer?

System details

  • Ubuntu 13.10
  • Eclipse Kepler Service Release 1
  • Tomcat v 7.0.50
2

You can use this command to identify any Tomcat process running in the background:

ps -ef | grep "org.apache.catalina.startup.Bootstrap" | grep -v grep

You should get a row like this for each running instance:

username    26546  5581 71 12:51 ?        00:00:07 /usr/lib/jvm/java-6-openjdk-amd64/bin/java -Dcatalina.base=/home/ringo/eclipseWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 -Dcatalina.home=/home/ringo/java/apache-tomcat-7.0.37 -Dwtp.deploy=/home/ringo/eclipseWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps -Djava.endorsed.dirs=/home/ringo/java/apache-tomcat-7.0.37/endorsed -Dfile.encoding=UTF-8 -classpath /home/ringo/java/apache-tomcat-7.0.37/bin/bootstrap.jar:/home/ringo/java/apache-tomcat-7.0.37/bin/tomcat-juli.jar:/usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar org.apache.catalina.startup.Bootstrap start

The second value on the row is the process ID. You can then use the kill command to terminate it, e.g.:

kill -9 26546

To both find the process and kill it in a single command:

ps -ef | grep "org.apache.catalina.startup.Bootstrap" | grep -v grep | awk '{ print $2 }' | xargs kill -9
0

I had the same issue and followed this answer on SO to resolve the issue. In short, shutdown the tomcat service by going to /usr/share/tomcat7/bin and then executing ./shutdown.sh which gave some warning messages(not java exceptions).

0

I think you have two server in your eclipse eclipse

If you want to solve this then 1. go to bottom of the eclipse ide click on the server and double click tomcat v8.0 whatever you have after clicking Overvie widow will be appear in this check the port and chenge the port numbers

2.If you don't want to change the port number then you have add only one server in your eclipse ide so you have to delete the server from your ide accept one server to delete go to window -> prefreneces -> servers -> runtimes environment servers will be appear right side add and remove and etc buttons will be available select the server which you have to remove and click remove button and then ok

finish Thank you...........

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.