When I quit remote SSH connection,tomcat will exit.So why? btw: No any errors in log files. Help me please!Thanks
3 Answers
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?– lapoJan 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– trozzJan 29, 2011 at 8:39
-
I agree with lapo &! would be better than just & sorry for the incorrect symbol :-)– trozzJan 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
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.