【发布时间】:2013-07-10 00:36:50
【问题描述】:
我有 bluepill 设置来监控我的延迟作业进程。
使用 Ubuntu 12.04。
我正在使用 Ubuntu 的 upstart 启动和监控 bluepill 服务本身。我的新贵配置如下 (/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 强行终止 bluepill,这会阻止 bluepill 进程重新生成。
此外,我认为由于跟踪的 PID 错误,重启/关机只是挂起,我每次都必须硬重置机器。
这可能是什么问题?
【问题讨论】:
标签: linux ubuntu upstart bluepill