monit-general
[Top][All Lists]
Advanced

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

Re: [monit] empty pidfile


From: Martin Pala
Subject: Re: [monit] empty pidfile
Date: Tue, 29 Dec 2009 20:12:47 +0100

In this case monit should restart the process - can you try to run it with -v 
option?:

  monit -vI

I think the problem could be that the startup script which is called by monit 
exits when it finds existing pidfile. 


As workaround you can either modify the program startup script to handle empty 
pidfile or set monit test to do so:

  check file /var/run/myprocess.pid
    if size = 0 then exec "/bin/rm /var/run/myprocess.pid"

Regards,
Martin


On Dec 29, 2009, at 7:29 PM, Dan Urist wrote:

> I have a daemon process I'm trying to monitor that will occasionally
> die uncleanly, leaving behind a zero-length pidfile. When this
> happens, monit logs "Error reading pid from file" and won't attempt to
> restart the process. Since monit never runs the init script for the
> daemon, there is no way to clean up the zero-length pidfile. Is there
> any workaround for this? I'm using monit v. 5.0.3.
> 
> -- 
> Dan Urist
> address@hidden
> 303-497-2459
> 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

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