Forum: Rails-ES [OT] Monit no quiere cuidarme los mongrels

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
94ac01209314464490a94b47f051be0b?d=identicon&s=25 alarkspur (Guest)
on 2009-01-24 11:32
(Received via mailing list)
Hola, estaba trasteando con monit para ver el comportamiento de los
mongrels en un app, pero aunque parece estar la configuración de monit
correctamente este no consigue levantar los mongrels

## El mensaje de error en cuestión al lanzar monit
sudo monit start all

'mongrel-8000' start: /opt/local/bin/mongrel_rails
'mongrel-8001' start: /opt/local/bin/mongrel_rails
'mongrel-8001' failed to start
'mongrel-8000' failed to start
macbook:~alarkspur$ starting port 8000
starting port 8000
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:
command not found: mongrel_rails start -d -e development -a 127.0.0.1 -
p 8000 -P /Users/alarkspur/Desktop/myapprails/tmp/pids/mongrel.
8000.pid -l /Users/alarkspur/Desktop/myapprails/log/mongrel.8000.log

/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:
command not found: mongrel_rails start -d -e development -a 127.0.0.1 -
p 8000 -P /Users/alarkspur/Desktop/myapprails/tmp/pids/mongrel.
8000.pid -l /Users/alarkspur/Desktop/myapprails/log/mongrel.8000.log

## si ejecuto which mongrel_rails
/opt/local/bin/mongrel_rails


La variable PATH y GEMDIR tambien parecen estar correctas
GEMDIR="/opt/local/lib/ruby/gems/1.8"
PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/
usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/local/git/bin/"


## Les pongo tambien un trozo del monitrc la parte correspondiente a
los mongrel, ya que monit en si, si que arranca

check process mongrel-8000 with pidfile /Users/alarkspur/Desktop/
myapprails/pids/mongrel.8000.pid
     start program = "/opt/local/bin/mongrel_rails cluster::start -C /
Users/alarkspur/Desktop/myapprails/config/mongrel_cluster.yml"
     stop program = "/opt/local/bin/mongrel_rails cluster::stop -C /
Users/alarkspur/Desktop/myapprails/config/mongrel_cluster.yml"


## Comentar tambien que mongrel_rails por si solo arranca y funciona
perfectamente ya que si copio y pego la linea start program funciona
correctamente


## sudo monit status
Process 'mongrel-8000'
   status                            Does not exist
   monitoring status                 monitored
   data collected                    Sat Jan 24 11:19:34 2009


## El resultado del log
[ Jan 24 11:23:34] info     : 'mongrel-8000' trying to restart
[ Jan 24 11:23:34] info     : 'mongrel-8000' start: /opt/local/bin/
mongrel_rails
[ Jan 24 11:23:34] error    : 'mongrel-8001' process is not running
[ Jan 24 11:23:34] info     : 'mongrel-8001' trying to restart
[ Jan 24 11:23:34] info     : 'mongrel-8001' start: /opt/local/bin/
mongrel_rails
[ Jan 24 11:23:34] error    : 'mongrel-8001' failed to start
[ Jan 24 11:23:34] error    : 'mongrel-8000' failed to start


## el mongrel_cluster de la carpeta config de mi app
---
address: 127.0.0.1
log_file: "/Users/alarkspur/Desktop/myapprails/log/mongrel.log"
port: "8000"
environment: development
pid_file: "/Users/alarkspur/Desktop/myapprails/tmp/pids/mongrel.pid"
servers: 2

Buff, vaya rollo que he puesto, muchas gracias desde ya por la info
que pueda darme para tener a los mongrel controlados.

Saludos.
89e7c8b162c71e9905fbfe7d2ec376dc?d=identicon&s=25 Fernando Blat (ferblape)
on 2009-01-24 12:32
(Received via mailing list)
Un buen truco cuando el monit hace cosas raras es ejecutar el
start_program a mano en un terminal. En tu caso:

/opt/local/bin/mongrel_rails cluster::start -C
/Users/alarkspur/Desktop/myapprails/config/mongrel_cluster.yml

Y ver si lanza mongreles

¿El pid lo crea?
94ac01209314464490a94b47f051be0b?d=identicon&s=25 alarkspur (Guest)
on 2009-01-24 20:19
(Received via mailing list)
> Un buen truco cuando el monit hace cosas raras es ejecutar el
> start_program a mano en un terminal. En tu caso:
>
> /opt/local/bin/mongrel_rails cluster::start -C
> /Users/alarkspur/Desktop/myapprails/config/mongrel_cluster.yml

Gracias Fernando, usando el comando mongrel_rails o ejecutando a mano
tal cual comentas el comando start de monit si se ejecutan los mongrels.

> ¿El pid lo crea?

No, no llega a crearse

Voy a seguir dandole vueltas, a ver si doy con ello. Saudos.
This topic is locked and can not be replied to.