Michael Steinfeld
2007-Aug-26 20:09 UTC
[Mongrel] monit not executing start/stop/restart mongrels
Alright, I have googles and read through the docs on monit
I get this error when adding -v starting monit
monit: Cannot connect to the monit daemon. Did you start it with http support?
monit: Cannot connect to the monit daemon. Did you start it with http support?
Am I missing something here?
set daemon 120
set logfile syslog facility log_daemon
set mailserver localhost
set httpd port 28212 and
#use address # only accept connection from localhost
allow me # allow localhost to connect to the server and
allow admin:password # require user ''admin'' with
password ''monit''
check process mongrel_9000
with pidfile /var/run/mongrel_cluster/mongrel.9000.pid
start program = "/usr/local/bin/mongrel_rails cluster::start -C
/etc/mongrel_cluster/mongrel_cluster.yml --clean --only 9000"
stop program = "/usr/local/bin/mongrel_rails cluster::stop -C
/etc/mongrel_cluster/mongrel_cluster.yml --clean --only 9000"
if totalmem is greater than 110.0 MB for 3 cycles then
restart # eating up memory?
if loadavg(5min) greater than 10 for 8 cycles then
restart # bad, bad, bad
if 20 restarts within 20 cycles then
timeout # something is wrong, call the sys-admin
group wwwapp
-------
mongrel.yml
-------
cwd: /home/wwwapp/current
port: "9000"
address: 127.0.0.1
log_file: log/mongrel.log
pid_file: /var/run/mongrel_cluster/mongrel.pid
environment: production
servers: 10
group: wwwapp
user: wwwapp
I was using the monit script to start - "/etc/init.d/monit start"
I have also tried "/usr/bin/monit -g www start all"
My mongrel run as the user/group "wwwapp"
any advice would really be appreciated.
--
Michael Steinfeld
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: mikeisgreat at gmail.com
Alexey Verkhovsky
2007-Aug-26 20:32 UTC
[Mongrel] monit not executing start/stop/restart mongrels
> I get this error when adding -v starting monit > monit: Cannot connect to the monit daemon. Did you start it with http support?Monit command line contacts the main monit process via the http interface, and in your case it cannot reach it. So, either the main monit process is not running, or it is unreachable through the network. I suspect that you need to add "allow localhost" directive to the "set httpd" section. By the way, this is a wrong maillist (your problem has nothing to do with mongrel), here is a better place to ask questions about monit: http://lists.nongnu.org/mailman/listinfo/monit-general -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com]