Hi,

according to log message the apache process itself is not running - in this 
case the port test is skipped and monit tries to restart the service, which can 
be seen in the log too. The config looks OK, it seems that the start attempt 
failed.

Can you verify whether the apache service can be stopped/started via monit?:

    monit stop apache
    monit start apache

There could be some environment variable required by the start script, whereas 
monit purges the environment on exec for security reasons (more details: 
http://mmonit.com/wiki/Monit/FAQ#execution).

Regards,
Martin


On Apr 8, 2010, at 12:06 PM, Linux Cook wrote:

> hi!
> 
> I'm trying to monitor an apache on port 3000. My config below:
> 
> set daemon  30
> set logfile syslog facility log_daemon
> 
> check process apache with pidfile /var/run/apache2.pid
>         group www-data
>         start program = "/etc/init.d/apache2 start"
>         stop  program = "/etc/init.d/apache2 stop"
> 
>         if failed host localhost port 3000 then restart
> 
> Monit responds when apache is offline but can't start it due to error:
> 
> Apr  8 05:29:38 dl014 monit[14649]: 'apache' process is not running
> Apr  8 05:29:38 dl014 monit[14649]: 'apache' trying to restart
> Apr  8 05:29:38 dl014 monit[14649]: 'apache' start: /etc/init.d/apache2
> Apr  8 05:29:39 dl014 monit[14649]: 'apache' failed to start
> 
> 
> Any thoughts? Anything I missed on config?
> 
> Oliver Cook
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general



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

Reply via email to