[Top][All Lists]

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

Re: monit with tomcat, PID problem

From: Jan-Henrik Haukeland
Subject: Re: monit with tomcat, PID problem
Date: Fri, 30 Apr 2004 21:29:57 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, linux)

"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/ 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

The default tomcat 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 script?

If the answer is that you use a wrapper script and use the default
tomcat or 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

Jan-Henrik Haukeland

reply via email to

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