[monit] Monit "connection failure" for apache

View: New views
4 Messages — Rating Filter:   Alert me  

[monit] Monit "connection failure" for apache

by Presence :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hey guys,

I have monit set up on my freebsd webserver, and everything seems to be working, but there is a problem.  On the monit service manager page (and with "monit status" it shows "Connection Failed" as the status for my apache service.  When I run "monit validate" I get no errors.

Here is my monitrc related to that monitoring setup:

monit-general@...
I had to put monit into passive mode so it wont keep restarting apache.  The output from "monit status" is below:

Process 'apache'
  status                            Connection failed
  monitoring status                 monitored
  pid                               14561
  parent pid                        1
  uptime                            54m
  childrens                         264
  memory kilobytes                  13168
  memory kilobytes total            4443884
  memory percent                    0.3%
  memory percent total              121.3%
  cpu percent                       11.2%
  cpu percent total                 11.2%
  port response time                0.008s to 127.0.0.1:80/monit/token [HTTP via TCP]
  data collected                    Tue Oct 23 18:50:38 2007

The port response time tells me that it does receive the token which just contains the text "Monit is running.".  If I connect to the webserver and request this file, it confirms I can request it, and that I get the contents.

How do I get it to work properly?  Every configuration I have checked is similar to mine...most are even less detailed.


Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power. Play Now!
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Re: [monit] Monit "connection failure" for apache

by Martin Pala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try to run monit in verbose mode (using -v option) and check logs.

Which monit version it is? On monit <4.9 there was bug, which may keep
the error flag when monit was reloaded, but it didn't restarted the
service incorrectly - just the report on status page was wrong (it was
fixed in monit 4.9)


Martin


The Presence wrote:

> Hey guys,
>
> I have monit set up on my freebsd webserver, and everything seems to be
> working, but there is a problem.  On the monit service manager page (and
> with "monit status" it shows "Connection Failed" as the status for my
> apache service.  When I run "monit validate" I get no errors.
>
> Here is my monitrc related to that monitoring setup:
>
> check process apache with pidfile /var/run/httpd.pid
>     start program = "/usr/local/etc/rc.d/apache22 start"
>     stop program  = "/usr/local/etc/rc.d/apache22 stop"
>     if cpu > 60% for 2 cycles then alert
>     if cpu > 80% for 5 cycles then restart
>     if totalmem > 6144.0 MB for 5 cycles then restart
>     if children > 500 then restart
>     if loadavg(5min) greater than 10 for 8 cycles then stop
>     if failed host www.tech-faq.com port 80 protocol http
>        request "/monit/token"
>        then restart
> #   monit will only monit/give alert in this mode.
>     mode passive
>     if 5 restarts within 5 cycles then timeout
>
> <mailto:monit-general@...>
> I had to put monit into passive mode so it wont keep restarting apache.  
> The output from "monit status" is below:
>
> Process 'apache'
>   status                            Connection failed
>   monitoring status                 monitored
>   pid                               14561
>   parent pid                        1
>   uptime                            54m
>   childrens                         264
>   memory kilobytes                  13168
>   memory kilobytes total            4443884
>   memory percent                    0.3%
>   memory percent total              121.3%
>   cpu percent                       11.2%
>   cpu percent total                 11.2%
>   port response time                0.008s to 127.0.0.1:80/monit/token
> [HTTP via TCP]
>   data collected                    Tue Oct 23 18:50:38 2007
>
> The port response time tells me that it does receive the token which
> just contains the text "Monit is running.".  If I connect to the
> webserver and request this file, it confirms I can request it, and that
> I get the contents.
>
> How do I get it to work properly?  Every configuration I have checked is
> similar to mine...most are even less detailed.
>
> ------------------------------------------------------------------------
> Climb to the top of the charts!  Play Star Shuffle:  the word scramble
> challenge with star power. Play Now!
> <http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct>
>
>
> ------------------------------------------------------------------------
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general


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

RE: [monit] Monit "connection failure" for apache

by Presence :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Martin,

I am running monit 4.9.  After killing monit and restarting it (with -v) it appears to have gone away.  Maybe the problem you are speaking of still exists in 4.9.

Kevin




> Date: Wed, 24 Oct 2007 22:26:53 +0200

> From: martinp@...
> To: monit-general@...
> Subject: Re: [monit] Monit "connection failure" for apache
>
> Try to run monit in verbose mode (using -v option) and check logs.
>
> Which monit version it is? On monit <4.9 there was bug, which may keep
> the error flag when monit was reloaded, but it didn't restarted the
> service incorrectly - just the report on status page was wrong (it was
> fixed in monit 4.9)
>
>
> Martin
>
>
> The Presence wrote:
> > Hey guys,
> >
> > I have monit set up on my freebsd webserver, and everything seems to be
> > working, but there is a problem. On the monit service manager page (and
> > with "monit status" it shows "Connection Failed" as the status for my
> > apache service. When I run "monit validate" I get no errors.
> >
> > Here is my monitrc related to that monitoring setup:
> >
> > check process apache with pidfile /var/run/httpd.pid
> > start program = "/usr/local/etc/rc.d/apache22 start"
> > stop program = "/usr/local/etc/rc.d/apache22 stop"
> > if cpu > 60% for 2 cycles then alert
> > if cpu > 80% for 5 cycles then restart
> > if totalmem > 6144.0 MB for 5 cycles then restart
> > if children > 500 then restart
> > if loadavg(5min) greater than 10 for 8 cycles then stop
> > if failed host www.tech-faq.com port 80 protocol http
> > request "/monit/token"
> > then restart
> > # monit will only monit/give alert in this mode.
> > mode passive
> > if 5 restarts within 5 cycles then timeout
> >
> > <mailto:monit-general@...>
> > I had to put monit into passive mode so it wont keep restarting apache.
> > The output from "monit status" is below:
> >
> > Process 'apache'
> > status Connection failed
> > monitoring status monitored
> > pid 14561
> > parent pid 1
> > uptime 54m
> > childrens 264
> > memory kilobytes 13168
> > memory kilobytes total 4443884
> > memory percent 0.3%
> > memory percent total 121.3%
> > cpu percent 11.2%
> > cpu percent total 11.2%
> > port response time 0.008s to 127.0.0.1:80/monit/token
> > [HTTP via TCP]
> > data collected Tue Oct 23 18:50:38 2007
> >
> > The port response time tells me that it does receive the token which
> > just contains the text "Monit is running.". If I connect to the
> > webserver and request this file, it confirms I can request it, and that
> > I get the contents.
> >
> > How do I get it to work properly? Every configuration I have checked is
> > similar to mine...most are even less detailed.
> >
> > ------------------------------------------------------------------------
> > Climb to the top of the charts! Play Star Shuffle: the word scramble
> > challenge with star power. Play Now!
> > <http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct>
> >
> >
> > ------------------------------------------------------------------------
> >
> > --
> > To unsubscribe:
> > http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general


Peek-a-boo FREE Tricks & Treats for You! Get 'em!
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Re: [monit] Monit "connection failure" for apache

by Martin Pala :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm sorry, the fix in 4.9 which i mentioned was different problem (the
state was reset/forgotten when monit was reloaded).

The fix for the status page problem is part of upcomming monit 4.10 -
excerpt from changelog:

--8<--
* Fixed a problem where monit would incorrect display an error in the
   web interface status page. This could occur if a service had failed,
   monit had reload and the state of the service had passed just after the
   reload (for example due to changes of the configuration rules). Thanks to
   Claus Klein for report and help with the patch.
--8<--

Martin


The Presence wrote:

> Martin,
>
> I am running monit 4.9.  After killing monit and restarting it (with -v)
> it appears to have gone away.  Maybe the problem you are speaking of
> still exists in 4.9.
>
> Kevin
>
>
>
> ------------------------------------------------------------------------
>  > Date: Wed, 24 Oct 2007 22:26:53 +0200
>  > From: martinp@...
>  > To: monit-general@...
>  > Subject: Re: [monit] Monit "connection failure" for apache
>  >
>  > Try to run monit in verbose mode (using -v option) and check logs.
>  >
>  > Which monit version it is? On monit <4.9 there was bug, which may keep
>  > the error flag when monit was reloaded, but it didn't restarted the
>  > service incorrectly - just the report on status page was wrong (it was
>  > fixed in monit 4.9)
>  >
>  >
>  > Martin
>  >
>  >
>  > The Presence wrote:
>  > > Hey guys,
>  > >
>  > > I have monit set up on my freebsd webserver, and everything seems
> to be
>  > > working, but there is a problem. On the monit service manager page
> (and
>  > > with "monit status" it shows "Connection Failed" as the status for my
>  > > apache service. When I run "monit validate" I get no errors.
>  > >
>  > > Here is my monitrc related to that monitoring setup:
>  > >
>  > > check process apache with pidfile /var/run/httpd.pid
>  > > start program = "/usr/local/etc/rc.d/apache22 start"
>  > > stop program = "/usr/local/etc/rc.d/apache22 stop"
>  > > if cpu > 60% for 2 cycles then alert
>  > > if cpu > 80% for 5 cycles then restart
>  > > if totalmem > 6144.0 MB for 5 cycles then restart
>  > > if children > 500 then restart
>  > > if loadavg(5min) greater than 10 for 8 cycles then stop
>  > > if failed host www.tech-faq.com port 80 protocol http
>  > > request "/monit/token"
>  > > then restart
>  > > # monit will only monit/give alert in this mode.
>  > > mode passive
>  > > if 5 restarts within 5 cycles then timeout
>  > >
>  > > <mailto:monit-general@...>
>  > > I had to put monit into passive mode so it wont keep restarting
> apache.
>  > > The output from "monit status" is below:
>  > >
>  > > Process 'apache'
>  > > status Connection failed
>  > > monitoring status monitored
>  > > pid 14561
>  > > parent pid 1
>  > > uptime 54m
>  > > childrens 264
>  > > memory kilobytes 13168
>  > > memory kilobytes total 4443884
>  > > memory percent 0.3%
>  > > memory percent total 121.3%
>  > > cpu percent 11.2%
>  > > cpu percent total 11.2%
>  > > port response time 0.008s to 127.0.0.1:80/monit/token
>  > > [HTTP via TCP]
>  > > data collected Tue Oct 23 18:50:38 2007
>  > >
>  > > The port response time tells me that it does receive the token which
>  > > just contains the text "Monit is running.". If I connect to the
>  > > webserver and request this file, it confirms I can request it, and
> that
>  > > I get the contents.
>  > >
>  > > How do I get it to work properly? Every configuration I have
> checked is
>  > > similar to mine...most are even less detailed.
>  > >
>  > >
> ------------------------------------------------------------------------
>  > > Climb to the top of the charts! Play Star Shuffle: the word scramble
>  > > challenge with star power. Play Now!
>  > >
> <http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct>
>  > >
>  > >
>  > >
> ------------------------------------------------------------------------
>  > >
>  > > --
>  > > To unsubscribe:
>  > > http://lists.nongnu.org/mailman/listinfo/monit-general
>  >
>  >
>  > --
>  > To unsubscribe:
>  > http://lists.nongnu.org/mailman/listinfo/monit-general
>
> ------------------------------------------------------------------------
> Peek-a-boo FREE Tricks & Treats for You! Get 'em!
> <http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us>
>
>
> ------------------------------------------------------------------------
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general


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