Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 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 at 5:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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