monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: monit with tomcat, PID problem


From: Ugo Bellavance
Subject: RE: monit with tomcat, PID problem
Date: Fri, 30 Apr 2004 15:39:31 -0400


>-----Message d'origine-----
>De : Jan-Henrik Haukeland [mailto:address@hidden
>Envoyé : 30 avril, 2004 15:30
>À : This is the general mailing list for monit
>Objet : Re: monit with tomcat, PID problem
>
>
>"Ugo Bellavance" <address@hidden> writes:
>
>>>-----Message d'origine-----
>>>De : Jan-Henrik Haukeland [mailto:address@hidden
>>>Envoyé : 29 avril, 2004 14:24
>>>À : This is the general mailing list for monit
>>>Objet : Re: monit with tomcat, PID problem
>>>
>>>
>>>"Ugo Bellavance" <address@hidden> writes:
>>>
>>>> in my startup script, the PID that is in /var/run/tomcat.pid is not
>>>> the same as the one in ps, after launching tomcat.  This has
>>>> probably something to do with the fact that tomcat spawns many
>>>> childs at startup.
>>>
>>>Have you read the FAQ? If not, see item 4. This may fix the problem.
>>
>> Yes, I did read the FAQ and applied the suggestion but the PID in
>> the file is wrong.
>
>Just to recap. When monit start a script it's usually important that
>the script does not put itself in the background with & after a
>statement because that will create a new process. If you use a wrapper
>script to get the pid you will get the wrong pid in this case. (a
>script should do an "exec whatever" and NOT "exec whatever&" or
>"whatever&".)

That's what I saw on the FAQ, tried it, see below.
>
>The default tomcat startup.sh script *does* in fact put itself in the
>background. So I'm curios, how is the pid file for tomcat created and
>do you use the default tomcate startup.sh script?

Yes I do.  However, if I remove the '&' in the catalina.sh script and then I 
execute the startup.sh or catalina.sh script, I don't get my prompt back...
Am I missing something here?

Thanks,

>
>If the answer is that you use a wrapper script and use the default
>tomcat startup.sh or catalina.sh you will get a problem with the pid
>and should remove the & in the tomcat script (as it says in the monit
>FAQ). However, if you use a distribution where tomcat create it's own
>pidfile and the pid in this file is not the same as the tomcat
>process, then it's hardly monit's fault and a bug in the tomcat
>distribution.
>
>-- 
>Jan-Henrik Haukeland
>
>
>
>--
>To unsubscribe:
>http://mail.nongnu.org/mailman/listinfo/monit-general
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]