monit-dev
[Top][All Lists]
Advanced

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

Re: Another 4.0 problem!


From: Martin Pala
Subject: Re: Another 4.0 problem!
Date: Thu, 18 Sep 2003 16:10:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4

Christian Hopp wrote:

Hi!

The monit CLI interface doesn't behave correctly... in SSL and nonSSL.
Monit is neither starting or stopping an app.  The status is done locally
and monit is often complaining "The monit server did not return a process,
device, file, directory or host record." => Socket connection is
successful... but unknown data has been received.

In most case monit does receive 0 bytes from the http server. Sometimes it
just does local status.

If I inspect it in gdb it seems not to complain it simply does the
local status.

It seems that first of all there is something in socket_read...
--- status.c, remote_status() ---
   if(0>(n= socket_read(sock, buf, BIGSTRLEN))) {
---
which is returning -1 or 0.

But the http support via web browser is working. => problem might be on the
client side.

I can verify this bug back to 4.0beta4... thats the oldest I have!

Now I have tried a much smaller and simpler monitrc (just 7
check... compared to 78 in my real-life server monitrc)... and it
works perfectly fine!  Any idea????

CHopp

I saw this problem during tests (on Debian unstable) too - monit httpd failed to start:

Sep  1 17:34:32 unicorn monit[5120]: Starting monit daemon
Sep  1 17:34:32 unicorn monit[5120]: Starting httpd at [127.0.0.1:2812]
Sep 1 17:34:32 unicorn monit[5124]: http server: Could not create a server socket at port 2812 -- Cannot assign requested address
Sep  1 17:34:32 unicorn monit[5124]: monit HTTP server not available

Thereafter "monit status" has exactly the same behavior as you descripted. You can't figure out the problem from console - on console you see only the first two lines:

Starting monit daemon
Starting httpd at [127.0.0.1:2812]

I saw it fewtimes in the past and tried to replicate it, but was not able to do so. The problem usualy occured when the computer was under high load and after the system was freshly started (the 2812 port was not used by any other application in the time or before monit tried to start). After i stopped monit and started it again, monit httpd binded without problems every time i tried to restart monit ragerdless of ratio. I tried to find the problem in the code - it seemed to me that the system call failed.

I'm not sure - probably the problem is not in monit and it could be solved when we will not terminate httpd startup on first error, but try to start it in some timeframe or reach some error ratio until its startup will timeout.

Martin






reply via email to

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