Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A problem occurred when I tried to run a java web-app on server

I use eclipse for java EE as my IDE and tomcat as my server. Here's the problem:

Several ports (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.

like image 308
snakile Avatar asked Feb 15 '26 02:02

snakile


2 Answers

It is as the exception says - you have a running instance of Tomcat (or, less likely, something else), that's taking ports 8080 and/or 8009. What to do:

  • if you've started tomcat, find it and stop it: using /etc/init.d/tomcat stop, or administrative tools > services > apache tomcat > stop, or shutdown.sh / shutdown.bat
  • if it is not you, find the process of tomcat and kill it (task manager on windows, and something like ps ux on nix)
  • if you don't find it, reboot
like image 138
Bozho Avatar answered Feb 17 '26 15:02

Bozho


It looks like you have a Tomcat running already. It is possible that Eclipse couldn't stop Tomcat and now that it tries to run it again, it can't. Find and kill the existing process or reboot.

like image 26
Steven Benitez Avatar answered Feb 17 '26 16:02

Steven Benitez