Sto utilizzando BluePill per gestire processi come il lavoro ritardato per Rails. Nel registro BluePill, sto ottenendo questo messaggio:File PID mancante quando si utilizza un gestore processi per avviare il lavoro ritardato
W, [2010-09-27T01:23:20.447053 #19441] WARN -- : [fsg_distro:delayed_job] pid_file /srv/fsg_distro/shared/pids/delayed_job.pid does not exist or cannot be read
W, [2010-09-27T01:23:20.447368 #19441] WARN -- : [fsg_distro:delayed_job] Executing start command: ruby script/delayed_job -e production start
I, [2010-09-27T01:23:20.469165 #19441] INFO -- : [fsg_distro:delayed_job] Going from down => starting
quindi è sostenendo che un file pid manca, che è, ma non dovrei che PID essere creato quando BluePill avvia il processo di lavoro in ritardo?
Aggiornamento essere un po 'più chiaro su questo errore, posso eseguire correttamente il comando manuale, ma Bluepill non riesce a eseguire il comando di avvio. Quando eseguo manualmente, sembra che questo:
[email protected]:/srv/fsg_distro/current$ /usr/bin/env RAILS_ENV=production /usr/bin/ruby /srv/fsg_distro/current/script/delayed_job start
delayed_job: process with pid 17564 started.
quando l'eseguo con Bluepill sembra che questo:
W, [2010-10-03T21:24:13.943136 #17326] WARN -- : [fsg_distro:delayed_job] pid_file /srv/fsg_distro/shared/pids/delayed_job.pid does not exist or cannot be read
W, [2010-10-03T21:24:13.943391 #17326] WARN -- : [fsg_distro:delayed_job] pid_file /srv/fsg_distro/shared/pids/delayed_job.pid does not exist or cannot be read
I, [2010-10-03T21:24:13.943811 #17326] INFO -- : [fsg_distro:delayed_job] Going from starting => down
W, [2010-10-03T21:24:14.945274 #17326] WARN -- : [fsg_distro:delayed_job] pid_file /srv/fsg_distro/shared/pids/delayed_job.pid does not exist or cannot be read
W, [2010-10-03T21:24:14.945495 #17326] WARN -- : [fsg_distro:delayed_job] pid_file /srv/fsg_distro/shared/pids/delayed_job.pid does not exist or cannot be read
W, [2010-10-03T21:24:14.945826 #17326] WARN -- : [fsg_distro:delayed_job] Executing start command: /usr/bin/env RAILS_ENV=production /usr/bin/ruby /srv/fsg_distro/current/script/delayed_job start
W, [2010-10-03T21:24:15.049261 #17326] WARN -- : [fsg_distro:delayed_job] Start command execution returned non-zero exit code:
W, [2010-10-03T21:24:15.049491 #17326] WARN -- : [fsg_distro:delayed_job] {:stderr=>"", :exit_code=>1, :stdout=>""}
I, [2010-10-03T21:24:15.049947 #17326] INFO -- : [fsg_distro:delayed_job] Going from down => starting
mio pillola simile a questa:
APP_ROOT='/srv/fsg_distro'
RAILS_ROOT='/srv/fsg_distro/current'
RAILS_ENV='production'
RUBY_EXEC='/usr/bin/ruby'
Bluepill.application("fsg_distro", :log_file => "/srv/fsg_distro/shared/log/bluepill.log") do |app|
app.process("delayed_job") do |process|
process.working_dir = RAILS_ROOT
process.start_grace_time = 30.seconds
process.stop_grace_time = 30.seconds
process.restart_grace_time = 30.seconds
process.start_command = "/usr/bin/env RAILS_ENV=#{RAILS_ENV} #{RUBY_EXEC} #{RAILS_ROOT}/script/delayed_job start"
process.stop_command = "/usr/bin/env RAILS_ENV=#{RAILS_ENV} #{RUBY_EXEC} #{RAILS_ROOT}/script/delayed_job stop"
process.pid_file = "#{APP_ROOT}/shared/pids/delayed_job.pid"
process.uid = "deploy"
process.gid = "deploy"
end
end
E il mio script di lavoro in ritardo è simile al seguente:
#!/usr/bin/env ruby
ENV['RAILS_ENV'] ||= 'production'
require File.dirname(__FILE__) + '/../config/environment'
require 'delayed/command'
Delayed::Command.new(ARGV).daemonize
2 domande visto come questo è ancora senza risposta. Quale permesso dovresti scrivere nella cartella/srv/fsg_distro/shared/pids/e le rotaie dell'utente (dalla macchina george?) Hanno tali permessi? – Hugo
Bluepill e me registrati sono lo stesso utente .... Finché l'utente è il proprietario o nel gruppo, può scrivere nella directory pids – Tony