Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tomcat 7 running on a virtual machine running Linux. I started tomcat as foreground process using a script and don't know how to stop it. I have tried stop, restart, start but all of the are giving me same error message:

status command: UNKNOWN due to Tomcat 7-based instance being started as a foreground process

stop command: Unable to stop Tomcat 7-based instance that was started as a foreground process. Use CTRL+C in the console of the process to stop the instance

any idea how can i stop the foreground tomcat instance?

share|improve this question

init scripts work just if you start it by themselves so they record and use later the pid.

you could try with:

killall -9 tomcat

or give "pstree" command and see which script or what is starting tomcat and kill that one aswell.

share|improve this answer
how i can find the foreground process instance? – yousafsajjad Feb 20 '14 at 21:01
"ps axwu | grep tomcat" will show you all the instances. You can then check the tty associated to see the foreground one or check the lowest pid and so on to see the main istance. – fede.evol Feb 21 '14 at 5:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .