monit-general
[Top][All Lists]
Advanced

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

Re: [monit] monit can't connect while apache is restarting gracefully


From: Martin Pala
Subject: Re: [monit] monit can't connect while apache is restarting gracefully
Date: Sun, 18 Nov 2007 20:55:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071008 Iceape/1.1.5 (Debian-1.1.5-1)

Apache is not responding to requests per monit logs. Since monit is acting as client in this test, other clients will have problem as well.

You should check why the apache is not responding.

When you need to mangle the service which is monitored by monit, you should either stop/start/restart the service via monit or disable the monitoring before the action and enable it afterwards. (monit "monitor" and "unmonitor" commands ... see monit manual for more details).

Martin


Sander van der Vliet wrote:
Hi,

Every morning at 6 AM my apache is restarted by logrotate to rotate the logs. This is done gracefully by: apache2ctl graceful > /dev/null

However, once every 2/3 days monit fails the connection/protocol test, while apache should still be able to handle requests during a graceful restart. How can this happen?

My rules:

    if failed host localhost port 80
         protocol HTTP request /monit/token
         then restart

   if failed host localhost port 443 type TCPSSL
        certmd5 53-CB-FC-77-5D-D6-CF-A8-F1-1C-64-40-90-4F-24-4B
        protocol HTTP request /monit/token
        then restart

The failure:

'apache2' failed, cannot open a connection to INET[localhost:443]
'apache2' failed, cannot open a connection to INET[localhost:80]

Or timetimes a protocol test failure:

'apache2' failed protocol test [HTTP] at INET[localhost:443].

Is this an apache problem? Apache should accept incomming connections right? Or is this a monit problem, are my rules too strict? Or is monit too strict?

The result is that apache is restarted twice, once graceful by logrotate, monit can't connect and then is restarted by monit an apache2 stop/start.

Any way to resolve this?

Sander


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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