monit-general
[Top][All Lists]
Advanced

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

Re: TCP error


From: Will Bryant
Subject: Re: TCP error
Date: Sat, 18 Nov 2006 11:41:17 +1300

Check first that your apache configuration is allowing enough concurrent connections.  I had similar symptoms when I moved to a new server recently, which I found strange as 'real' requests all seemed to be going fine.  It turned out that the default connection limit was too low, and so when the server had a number of clients monit's connection might not get serviced before it timed out.

Next I'd check that it is always resolving to the same target; try putting the hostname in your hosts file and see whether that has any impact.  (I take it that www.myserver.com in the successful examples is actually www.ipetitions.com, as in the failure example - would be pretty odd for monit to show a different hostname for the two cases :).)

Finally, I'd probably try setting up an iptables rule to log the relevant events and see if that gives any clues.

Will


On 11/18/06, mikula mali <address@hidden> wrote:
I have monit setup to check on our Apache (v 2.2.3) and a couple of other
resources with 2min cycles. The problem is that monit reports strange HTTP
error very frequently (avery hour or so) although the apache seems to be
very healthy as I can see from apache logs -- basically there's no
interruption of traffic to the outside world. Then after a couple of
minutes, things seem to fix on their own (ie. monit doesnt report an error).

Here's my monit error:

>>'apache' failed, cannot open a connection to INET[www.ipetitions.com:80]
>>via TCP

and the entry in monitrc to check on apache is as follows (running on
myserver.com machine):
>>
  if failed host www.myserver.com port 80 protocol http
       and request "/monit_token"
       with timeout 30 seconds
       for 3 times within 5 cycles
       then restart
>>

So it is NOT http protocol that fails... monit simply fails to open a TCP
port I guess. When there's a success, the following two lines are in the
log:
>>'apache' succeeded connecting to INET[www.myserver.com:80] via TCP
>>'apache' succeeded testing protocol [HTTP] at INET[ www.myserver.com:80]
>>via TCP

Does anyone have a clue what might be the problem here? Maybe something to
do with TCP stack and not monit itself? I'm running this on
RHEL4/Centos4_x64 system. We get decent traffic (5k hits daily), but nothing
too bad and average cpu loads on the server are about 0.1 or so...

-mike

_________________________________________________________________
Share your latest news with your friends with the Windows Live Spaces
friends module.
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=""



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


reply via email to

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