我有 bluepill 设置来监控我的延迟作业流程。
使用 Ubuntu 12.04。
我正在使用 Ubuntu 的upstart
. 我的新贵配置低于(/etc/init/bluepill.conf
)。
description "Start up the bluepill service"
start on runlevel [2]
stop on runlevel [016]
expect fork
exec sudo /home/deploy/.rvm/wrappers/<app_name>/bluepill load /home/deploy/websites/<app_name>/current/config/server/staging/delayed_job.bluepill
# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn
我也试过用expect daemon
而不是expect fork
. 我也尝试过expect...
完全删除这条线。
当机器启动时,bluepill 启动正常。
$ ps aux | grep blue
root 1154 0.6 0.8 206416 17372 ? Sl 21:19 0:00 bluepilld: <app_name>
bluepill 进程的 PID 在这里是 1154。但upstart
似乎正在跟踪错误的 PID。
$ initctl status bluepill
bluepill start/running, process 990
如果我使用kill -9
.
此外,我认为由于跟踪的 PID 错误,重新启动/关机只是挂起,我每次都必须硬重置机器。
这里可能是什么问题?