monit-general
[Top][All Lists]
Advanced

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

Re: configuring monit's httpd


From: Allen Shaw
Subject: Re: configuring monit's httpd
Date: Fri, 9 Jan 2004 16:31:30 -0500

Hi Christian,

Thanks for your comments!  I realized after sending that I have the wrong
subject header -- it should be "New install: Segmentation Fault", but you
addressed the real issue in any case.

>> Could anyone recommend a further debug procedure to help me figure out
>> what's going on?
>
>strace -ft monit -Iv
>
>This command shows all system calls during the run (-f = trace forks,
>-t = show time).  Any further debugging would result in heavy gdb
>usage.
>
>Btw, did you compile monit yourself or is it a ready made package?
>

Monit was compiled by me using the commands just as I read them from the
docs (unfortunately, I have not yet learned what these commands mean...).
As far as I can tell, that compile went well.

As for strace, I get a God-auful lot of output that I'm not sure what to do
with -- could anyone give me a clue what I'm looking for.  Unfortunately my
programming experience is limited to a couple of scripting languages, so I
am grateful for any tips to make sense of the strace output.  I do get about
a thousand consecutive lines like this, which make me wonder:
    13:41:11 close(3)                       = -1 EBADF (Bad file descriptor)
    13:41:11 close(4)                       = -1 EBADF (Bad file descriptor)
    ...
    13:41:11 close(1022)                    = -1 EBADF (Bad file descriptor)
    13:41:11 close(1023)                    = -1 EBADF (Bad file descriptor)

I you or someone listening could help me with where to look, a few things to
check and what to look out for, I'm willing to do plenty of work, research,
and debugging to get this going. Any suggestions?

Thanks,
Allen

>
>----- Original Message ----- 
>From: "Christian Hopp" <address@hidden>
>To: "This is the general mailing list for monit" <address@hidden>
>Sent: Friday, January 09, 2004 5:44 AM
>Subject: Re: configuring monit's httpd
>
>
>On Thu, 8 Jan 2004, Allen Shaw wrote:
>
>Hi Allen!
>
>> I have just installed monit, running with a basic config file (shown
>> below) -- as far as I can see it is not running well (I get no monit http
>> connection on port 2812 where I expected it; I get no alert or restart on
>> the service I'm monitoring when it goes down; and, when I run monit with
>> 'quit' argument, I see 'monit: no daemon process found').  So, I ran
monit
>> with the -Iv switch, which pumps out some configuration info and then
ends
>> with the follwing two encouraging lines:
>>
>> Starting monit daemon
>> Segmentation fault
>
>Mhh...!  What user is running the monit daemon... root?  You have to
>set a smtp server for the alerts "set mailserver whatever.server.foo".
>
>> (For some reason I can't get the monit -Iv output to write to a file, but
I
>> think you can guess most of it from the following, which is the text of
my
>> control file:)
>
>Does /var/log/monit have any useful content?
>
>> ======= Start text of ~/.monitrc ===============
>>  set daemon  120           # Poll at 2-minute intervals
>>  set logfile /var/log/monit #syslog facility log_daemon # Set syslog
logging
>>  set alert address@hidden  # Send alert to system admin on any event
>
>This does look okay so far.
>
>>  set httpd port 2812 and   # Make monit start it's web-server
>>      use address ifwpdata.com  # and only accept connection from
localhost
>>      allow localhost       # allow localhost to connect to the server and
>>      allow iifwpdata.com
>>      allow admin:monit     # user 'admin' with password 'monit'
>
>This is inconsistent!  If you only want to use localhost write it like
this:
>
>set httpd port 2812 and
>    use address localhost
>    allow localhost
>    allow admin:monit
>
>You configuration does not allow localhost to connect, because you do
>not bind to it.  And "ifwpdata.com" != "iifwpdata.com".
>
>>   check process apache with pidfile /var/run/httpd.pid
>>      start program = "/etc/rc.d/init.d/httpd start"
>>      stop program  = "/etc/rc.d/init.d/httpd stop"
>>     if failed host iifwpdata.com port 80 protocol http
>>        and request "/index.html" then restart
>
>(...)
>
>> Could anyone recommend a further debug procedure to help me figure out
>> what's going on?
>
>strace -ft monit -Iv
>
>This command shows all system calls during the run (-f = trace forks,
>-t = show time).  Any further debugging would result in heavy gdb
>usage.
>
>Btw, did you compile monit yourself or is it a ready made package?
>
>CHopp
>
>-- 
>Christian Hopp                                email:
address@hidden
>Institut für Elektrische Informationstechnik             fon:
+49-5323-72-2113
>TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax:
+49-5323-72-3197
>                             pgpkey:
https://www.iei.tu-clausthal.de/pgp-keys/
>
>
>
>--
>To unsubscribe:
>http://mail.nongnu.org/mailman/listinfo/monit-general
>




reply via email to

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