When I quit remote SSH connection,tomcat will exit.So why? btw: No any errors in log files. Help me please!Thanks

  • Could you possibly tell us what you have tried already if any ;-) this should help people from asking you to try the same steps again
    – trozz
    Jan 29, 2011 at 8:41
  • nohup,screen, +&, all i have tried!
    – CatWin
    Jan 29, 2011 at 8:55

3 Answers 3


From the sounds of it, it sounds as tho you are running tomcat under your login,

from SSH start tomcat (/etc/init.d/tomcat start) I think this should start it with the user that tomcat is specified to use

if not you can start it with the full install path and add an and (&!) sign at the end to run in the background

  • Agree with Trozz, even though his answer has something of a poem ;-). Jan 29, 2011 at 8:29
  • 1
    & gets a background process but not detached from the shell, isn't &! better at that?
    – lapo
    Jan 29, 2011 at 8:38
  • ;-) wasn't meant to be, was trying to remember tomcat as i haven't used it in a long time but sadly it sounds as though my answer wouldn't work for CatWin
    – trozz
    Jan 29, 2011 at 8:39
  • I agree with lapo &! would be better than just & sorry for the incorrect symbol :-)
    – trozz
    Jan 29, 2011 at 8:40
  • That's why we don't use /etc/init.d/script in general :> It's better to use service script restart because the application is started with proper user environment (If you use /etc/init.d/ the service will have your environment ) Jan 29, 2011 at 12:15

if tomcat is downloaded from apache website then using (&) sign will not work you need to use nohup command

  • it's not ok.I have tried it.
    – CatWin
    Jan 29, 2011 at 8:37

If you downloaded a tomcat binary from the Apache website, it ships with a startup script in $CATALINA_HOME/bin, either startup.bat or startup.sh. There is also a shutdown script in the same directory. From the RUNNING.txt in $CATALINA_HOME

(3) Start Up Tomcat

(3.1) Tomcat can be started by executing the following commands:

  $CATALINA_HOME\bin\startup.bat          (Windows)

  $CATALINA_HOME/bin/startup.sh           (Unix)

$CATALINA_HOME will be where you unarchived the file you downloaded for tomcat.

You must log in to answer this question.

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