Bug#350131: Init script does not detach from terminal correctly

Loïc Minier lool at dooz.org
Fri Jan 27 16:08:22 UTC 2006


Package: tomcat5
Severity: normal

        Hi,

 I successfully installed tomcat5 5.0.30-9 and it's running happily with
 sun-j2sdk1.4 1.4.2+08.

 When I stop and start tomcat5, it stops and starts correctly, but I
 can't logout from my SSH session after that.  I suspect some process is
 not backgrounding / daemonizing correctly and keeps it's tty open:
 bee% ssh root at vm-10
 Last login: Fri Jan 27 16:34:31 2006 from lan-48
 vm-10# ^D
 Connection to vm-10.vm-dmz.bpl-group.org closed.
 bee% 

 bee% ssh root at vm-10
 Last login: Fri Jan 27 16:38:49 2006 from lan-48
 vm-10# /etc/init.d/tomcat5 stop
 Stopping Tomcat 5 servlet engine: .tomcat5.
 vm-10# /etc/init.d/tomcat5 start
 Starting Tomcat 5 servlet engine using Java from /usr/lib/j2sdk1.4-sun:
 tomcat5.
 vm-10# ^D
 

 => ssh session hangs.

 Running "nohup /etc/init.d/tomcat5 start" instead of
 "/etc/init.d/tomcat5 start" is enough to be able to logout.

 I suspect this is a problem with the log rotation utility since I
 could logout after commenting out the following block from the init
 script:
       su -p -s /bin/sh $TOMCAT5_USER \
                       -c "$ROTATELOGS \"$CATALINA_BASE/logs/catalina_%F.log\" 86400" \
                       < "$CATALINA_BASE/logs/catalina.out" &
 (I had to "cat /var/lib/tomcat5/logs/catalina.out" manually from
 another console of course.)


 I suppose you could run /usr/sbin/rotatelogs from a start-stop-daemon
 -b call?


 The setup is a Xen virtual machine running Sarge.  I doubt this is the
 source of the problem, but I prefer mentionning this important
 information.

   Cheers,
-- 
Loïc Minier <lool at dooz.org>
Current Earth status:   NOT DESTROYED




More information about the pkg-java-maintainers mailing list