monit-dev
[Top][All Lists]
Advanced

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

Re: monit_http


From: Jan-Henrik Haukeland
Subject: Re: monit_http
Date: 18 Feb 2003 00:58:00 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Rory Toma <address@hidden> writes:

> Just out of curiousity, what version of gcc are you using?

In this case I was using the RedHat's idiotic 2.96 release for RH 7.3
for building monit. (I normally use (GCC) 3.2.1). But this problem is
almost certainly not a compiler issue.

> My machine is reasonably fast. For now, I'm adding this:
> 
> if (Run.init)
>       exit(1);
> 
> to the failure of create_server_socket in engine.c:start_httpd
> I'm going to add this locally, as it fixes a problem we're seeing, and I
> can investigate as to why this happens to me on different systems.

That's a fair thing to do. BTW, how long do you have to wait before
monit can bind the server socket again after you do a skill -9 monit?
If the wait is in seconds, the best thing to do, I agree, is to just
exit, but if it's short it may be worth looping a few times in
engine.c:start_httpd ala (a draft, not tested, and I'm not sure about
the error code):

  do {
     myServerSocket= create_server_socket(port, backlog, bindAddr);
  } while(myServerSocket < 0 && errno == EADDRINUSE && maxtries-- > 0); 


-- 
Jan-Henrik Haukeland




reply via email to

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