Server Fault is a question and answer site for system and network administrators. 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

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

share|improve this question
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 '11 at 8:41
nohup,screen, +&, all i have tried! – CatWin Jan 29 '11 at 8:55

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

share|improve this answer
Agree with Trozz, even though his answer has something of a poem ;-). – desasteralex Jan 29 '11 at 8:29
& gets a background process but not detached from the shell, isn't &! better at that? – lapo Jan 29 '11 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 '11 at 8:39
I agree with lapo &! would be better than just & sorry for the incorrect symbol :-) – Trozz Jan 29 '11 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 ) – Nikolaidis Fotis Jan 29 '11 at 12:15

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

share|improve this answer
it's not ok.I have tried it. – CatWin Jan 29 '11 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 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/           (Unix)

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

share|improve this answer

Your Answer


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.