<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText79739 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Olá,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Estou tendo problemas com uma instalação do Tomcat em um servidor rodando CentOS 5.2 com JAVA 1.6.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Utilizo o seguinte script para iniciar e parar o tomcat:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>#!/bin/bash<BR>#<BR># Startup script for the tomcat<BR>#<BR># chkconfig: 345 80 15<BR># description: Tomcat is a Servlet+JSP Engine.</DIV>
<DIV dir=ltr># Source function library.<BR>. /etc/rc.d/init.d/functions</DIV>
<DIV dir=ltr>start(){<BR>if [ -z $(/sbin/pidof java) ]; then<BR>echo .Starting tomcat.<BR>/usr/local/tomcat/bin/startup.sh<BR>touch /var/lock/subsys/tomcat<BR>else<BR>echo .tomcat allready running.<BR>fi<BR>}</DIV>
<DIV dir=ltr>stop(){<BR>if [ ! -z $(/sbin/pidof java) ]; then<BR>echo .Shutting down tomcat.<BR>/usr/local/tomcat/bin/shutdown.sh<BR>until [ -z $(/sbin/pidof java) ]; do :; done<BR>rm -f /var/lock/subsys/tomcat<BR>else<BR>echo .tomcat not running.<BR>fi<BR>}</DIV>
<DIV dir=ltr>case $1 in<BR>&nbsp;&nbsp;&nbsp; start)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start<BR>&nbsp;&nbsp;&nbsp; ;;<BR>&nbsp;&nbsp;&nbsp; stop)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop<BR>&nbsp;&nbsp;&nbsp; ;;<BR>&nbsp;&nbsp;&nbsp; restart)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start<BR>&nbsp;&nbsp;&nbsp; ;;<BR>&nbsp;&nbsp;&nbsp; status)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/local/tomcat/bin/catalina.sh version<BR>&nbsp;&nbsp;&nbsp; ;;<BR>&nbsp;&nbsp;&nbsp; *)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $"Usage: $0 {start|stop|restart|status}"<BR>&nbsp;&nbsp;&nbsp; ;;<BR>&nbsp;&nbsp;&nbsp; esac</DIV>
<DIV dir=ltr>exit 0<BR></DIV>
<DIV dir=ltr>Para iniciar o tomcat, ele funciona corretamente, mas para parar, ele não finaliza o script, porque o shutdown.sh não consegue parar o processo. O tomcat já não está mais funcionando, mas mesmo assim o processo continua rodando, e só para quando eu mato manualmente com o 'kill'. </DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr>Agradeço desde já.</DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr>Att.</DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature42062 dir=ltr><PRE>Fábio da Silva Júnior - fjunior@univali.br
Laboratório de Computação Aplicada - G10
Laboratório de Redes
UNIVALI - Universidade do Vale do Itajaí</PRE></DIV></BODY></HTML>