monit-dev
[Top][All Lists]
Advanced

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

Re: darwin works with small tweak


From: Martin Pala
Subject: Re: darwin works with small tweak
Date: Thu, 18 Sep 2003 11:41:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4

Jan-Henrik Haukeland wrote:

Rick Robino <address@hidden> writes:

As I mentioned in that past letter I can make the error go away by
adjusting just one expression in socket.c;

Ah, but using the address of and address must be wrong, and by doing
this, the host variable must point to wonderland (i.e. the host
variable cannot contain sensible data in create_socket()):

Socket_T socket_new(const char *host, int port, int type, int use_ssl) {
....
if((s= create_socket((char *)&host, port, proto, NET_TIMEOUT)) != -1)

socket_new() is called from remote_status() by:

Socket_T sock= socket_new(Run.bind_addr?Run.bind_addr:"localhost", Run.httpdport, SOCKET_TCP, Run.httpdssl);

=> in the case that you have not specified which address is monit httpd binded to, "monit status" will connect to localhost to obtain status from running daemon (where the string "localhost" is static).

Does it fail if you specify monit httpd address in monit configuration file, such as:

 set httpd port 2812 and
    use address 127.0.0.1
    allow 127.0.0.1

as well as in the case that you have not specified the interface?:

 set httpd port 2812 and
    allow 127.0.0.1

(Note: in the first case value of Run.bind_addr will be used, in the second case "localhost" will be used).


Thanks,
Martin





reply via email to

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