can't start monit service

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

can't start monit service

Oliver A. Rojo
I just intalled monit using Fedora core 2 distribution. My /etc/monitrc
config:

set httpd port 2812
      allow localhost
      allow 192.168.3.191
      allow traxx:hitman

check process apache2 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 192.168.3.221 port 80
         protocol HTTP request /monit/token
         then restart
    if 5 restarts within 5 cycles then timeout
    group www
    depends apache2_init
    depends apache2_bin

check file apache2_init with path /etc/rc.d/init.d/httpd
    group apache

check file apache2_bin with path /usr/sbin/httpd
    group apache

where:
192.168.3.221: ip address of  monit server

But everytime i start monit service it usually says:

Nov  2 15:06:26 pumbaa httpd: httpd shutdown succeeded
Nov  2 15:10:45 pumbaa monit: 'apache2' process is not running
Nov  2 15:10:45 pumbaa monit: 'apache2' trying to restart
Nov  2 15:10:45 pumbaa monit: 'apache2' start: /etc/rc.d/init.d/httpd
Nov  2 15:10:45 pumbaa monit: 'apache2' failed to start
Nov  2 15:10:45 pumbaa monit: monit startup succeeded
Nov  2 15:10:45 pumbaa httpd: httpd startup succeeded

# service monit status
monit dead but subsys locked

Did i missed something?



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: can't start monit service

martinp@tildeslash.com
Hi,

please try to start monit using following command:

  monit -vI

... and send the output

Thanks,
Martin

Oliver A. Rojo wrote:

> I just intalled monit using Fedora core 2 distribution. My /etc/monitrc
> config:
>
> set httpd port 2812
>      allow localhost
>      allow 192.168.3.191
>      allow traxx:hitman
>
> check process apache2 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 192.168.3.221 port 80
>         protocol HTTP request /monit/token
>         then restart
>    if 5 restarts within 5 cycles then timeout
>    group www
>    depends apache2_init
>    depends apache2_bin
>
> check file apache2_init with path /etc/rc.d/init.d/httpd
>    group apache
>
> check file apache2_bin with path /usr/sbin/httpd
>    group apache
>
> where:
> 192.168.3.221: ip address of  monit server
>
> But everytime i start monit service it usually says:
>
> Nov  2 15:06:26 pumbaa httpd: httpd shutdown succeeded
> Nov  2 15:10:45 pumbaa monit: 'apache2' process is not running
> Nov  2 15:10:45 pumbaa monit: 'apache2' trying to restart
> Nov  2 15:10:45 pumbaa monit: 'apache2' start: /etc/rc.d/init.d/httpd
> Nov  2 15:10:45 pumbaa monit: 'apache2' failed to start
> Nov  2 15:10:45 pumbaa monit: monit startup succeeded
> Nov  2 15:10:45 pumbaa httpd: httpd startup succeeded
>
> # service monit status
> monit dead but subsys locked
>
> Did i missed something?
>
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: can't start monit service

Oliver A. Rojo
Martin Pala wrote:

> Hi,
>
> please try to start monit using following command:
>
>  monit -vI
>
> ... and send the output
>
> Thanks,
> Martin
>
> Oliver A. Rojo wrote:
>
>> I just intalled monit using Fedora core 2 distribution. My
>> /etc/monitrc config:
>>
>> set httpd port 2812
>>      allow localhost
>>      allow 192.168.3.191
>>      allow traxx:hitman
>>
>> check process apache2 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 192.168.3.221 port 80
>>         protocol HTTP request /monit/token
>>         then restart
>>    if 5 restarts within 5 cycles then timeout
>>    group www
>>    depends apache2_init
>>    depends apache2_bin
>>
>> check file apache2_init with path /etc/rc.d/init.d/httpd
>>    group apache
>>
>> check file apache2_bin with path /usr/sbin/httpd
>>    group apache
>>
>> where:
>> 192.168.3.221: ip address of  monit server
>>
>> But everytime i start monit service it usually says:
>>
>> Nov  2 15:06:26 pumbaa httpd: httpd shutdown succeeded
>> Nov  2 15:10:45 pumbaa monit: 'apache2' process is not running
>> Nov  2 15:10:45 pumbaa monit: 'apache2' trying to restart
>> Nov  2 15:10:45 pumbaa monit: 'apache2' start: /etc/rc.d/init.d/httpd
>> Nov  2 15:10:45 pumbaa monit: 'apache2' failed to start
>> Nov  2 15:10:45 pumbaa monit: monit startup succeeded
>> Nov  2 15:10:45 pumbaa httpd: httpd startup succeeded
>>
>> # service monit status
>> monit dead but subsys locked
>>
>> Did i missed something?
>>
>>
>>
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
>
>
here's the output...

monit: Debug: Adding host allow 'localhost' (127.0.0.1).
monit: Debug: Adding net allow '192.168.3.191'.
monit: Debug: Adding credentials for user 'traxx'.
monit: Error: Poll time not defined. Please define poll time in the
 control file or use the -d option when starting monit


--


Oliver A. Rojo
Linux Consultant/Systems Administrator
Antico Group, Inc.
530 39/f Summit One Tower
Shaw Blvd, Mandaluyong City
Work Email : [hidden email]
Tel. Number : 533 0065 loc 114
Personal e-Mail : [hidden email]
Mobile     : +639206728718
Yahoo id   : veoroj
Linux User : #396670

______________________________________________________________

This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error
please notify the system manager. Please note that any views or
opinions presented in this email are solely those of the author
and do not necessarily represent those of the company. Finally,
the recipient should check this email and any attachments for the
 presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: can't start monit service

martinp@tildeslash.com
Oliver A. Rojo wrote:

> Martin Pala wrote:
>
>> Hi,
>>
>> please try to start monit using following command:
>>
>>  monit -vI
>>
>> ... and send the output
>>
>> Thanks,
>> Martin
>>
>> Oliver A. Rojo wrote:
>>
>>> I just intalled monit using Fedora core 2 distribution. My
>>> /etc/monitrc config:
>>>
>>> set httpd port 2812
>>>      allow localhost
>>>      allow 192.168.3.191
>>>      allow traxx:hitman
>>>
>>> check process apache2 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 192.168.3.221 port 80
>>>         protocol HTTP request /monit/token
>>>         then restart
>>>    if 5 restarts within 5 cycles then timeout
>>>    group www
>>>    depends apache2_init
>>>    depends apache2_bin
>>>
>>> check file apache2_init with path /etc/rc.d/init.d/httpd
>>>    group apache
>>>
>>> check file apache2_bin with path /usr/sbin/httpd
>>>    group apache
>>>
>>> where:
>>> 192.168.3.221: ip address of  monit server
>>>
>>> But everytime i start monit service it usually says:
>>>
>>> Nov  2 15:06:26 pumbaa httpd: httpd shutdown succeeded
>>> Nov  2 15:10:45 pumbaa monit: 'apache2' process is not running
>>> Nov  2 15:10:45 pumbaa monit: 'apache2' trying to restart
>>> Nov  2 15:10:45 pumbaa monit: 'apache2' start: /etc/rc.d/init.d/httpd
>>> Nov  2 15:10:45 pumbaa monit: 'apache2' failed to start
>>> Nov  2 15:10:45 pumbaa monit: monit startup succeeded
>>> Nov  2 15:10:45 pumbaa httpd: httpd startup succeeded
>>>
>>> # service monit status
>>> monit dead but subsys locked
>>>
>>> Did i missed something?
>>>
>>>
>>>
>>> --
>>> To unsubscribe:
>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>
>>
>>
>>
>>
> here's the output...
>
> monit: Debug: Adding host allow 'localhost' (127.0.0.1).
> monit: Debug: Adding net allow '192.168.3.191'.
> monit: Debug: Adding credentials for user 'traxx'.
> monit: Error: Poll time not defined. Please define poll time in the
> control file or use the -d option when starting monit
>
>

Problem is that you try to start monit in daemon mode, but there is no
poll time (monitoring frequency) specified.

You can either add to the /etc/monitrc the 'set daemon ...' statement:

  set daemon 5

(for example to monitor each 5s)

or add '-d ...' option to the start command line in startup script.


Martin


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: can't start monit service

Oliver A. Rojo
Martin Pala wrote:

> Oliver A. Rojo wrote:
>
>> Martin Pala wrote:
>>
>>> Hi,
>>>
>>> please try to start monit using following command:
>>>
>>>  monit -vI
>>>
>>> ... and send the output
>>>
>>> Thanks,
>>> Martin
>>>
>>> Oliver A. Rojo wrote:
>>>
>>>> I just intalled monit using Fedora core 2 distribution. My
>>>> /etc/monitrc config:
>>>>
>>>> set httpd port 2812
>>>>      allow localhost
>>>>      allow 192.168.3.191
>>>>      allow traxx:hitman
>>>>
>>>> check process apache2 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 192.168.3.221 port 80
>>>>         protocol HTTP request /monit/token
>>>>         then restart
>>>>    if 5 restarts within 5 cycles then timeout
>>>>    group www
>>>>    depends apache2_init
>>>>    depends apache2_bin
>>>>
>>>> check file apache2_init with path /etc/rc.d/init.d/httpd
>>>>    group apache
>>>>
>>>> check file apache2_bin with path /usr/sbin/httpd
>>>>    group apache
>>>>
>>>> where:
>>>> 192.168.3.221: ip address of  monit server
>>>>
>>>> But everytime i start monit service it usually says:
>>>>
>>>> Nov  2 15:06:26 pumbaa httpd: httpd shutdown succeeded
>>>> Nov  2 15:10:45 pumbaa monit: 'apache2' process is not running
>>>> Nov  2 15:10:45 pumbaa monit: 'apache2' trying to restart
>>>> Nov  2 15:10:45 pumbaa monit: 'apache2' start: /etc/rc.d/init.d/httpd
>>>> Nov  2 15:10:45 pumbaa monit: 'apache2' failed to start
>>>> Nov  2 15:10:45 pumbaa monit: monit startup succeeded
>>>> Nov  2 15:10:45 pumbaa httpd: httpd startup succeeded
>>>>
>>>> # service monit status
>>>> monit dead but subsys locked
>>>>
>>>> Did i missed something?
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe:
>>>> http://lists.nongnu.org/mailman/listinfo/monit-general
>>>
>>>
>>>
>>>
>>>
>>>
>> here's the output...
>>
>> monit: Debug: Adding host allow 'localhost' (127.0.0.1).
>> monit: Debug: Adding net allow '192.168.3.191'.
>> monit: Debug: Adding credentials for user 'traxx'.
>> monit: Error: Poll time not defined. Please define poll time in the
>> control file or use the -d option when starting monit
>>
>>
>
> Problem is that you try to start monit in daemon mode, but there is no
> poll time (monitoring frequency) specified.
>
> You can either add to the /etc/monitrc the 'set daemon ...' statement:
>
>  set daemon 5
>
> (for example to monitor each 5s)
>
> or add '-d ...' option to the start command line in startup script.
>
>
> Martin
>
>
thanks martin! i think it's working now...





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