Monit无法停止sidekiq 6

问题描述 投票:0回答:1

我正在升级到使用monit的sidekiq6。由于sidekiq6不支持PID(https://github.com/mperham/sidekiq/wiki/Deployment#running-your-own-process)文件,因此我试图停止使用https://github.com/ajgon/opsworks_ruby/blob/master/templates/default/sidekiq.monitrc.erb

它不会在监视停止/重新启动等时停止。

[PST Mar  5 04:11:01] info     : 'sidekiq_cric-1' trying to restart
[PST Mar  5 04:11:01] info     : 'sidekiq_cric-1' stop: /bin/su
[PST Mar  5 04:12:31] error    : 'sidekiq_cric-1' failed to stop
[PST Mar  5 04:12:31] info     : 'sidekiq_cric-1' restart action done

如果我在控制台上执行以下操作,则会终止工作。stop program = "/bin/su - deploy -c 'ps -ax | grep "bundle exec sidekiq" | grep sidekiq_1.yml| | grep -v grep | awk "{print \$1}" | xargs --no-run-if-empty pgrep -P | xargs --no-run-if-empty kill'" with timeout 90 seconds

[请让我知道我在这里犯了什么错误...

sidekiq aws-opsworks monit
1个回答
0
投票

它的工作感谢而不是grep“ bundle exec sidekiq”,我使用了不带双引号的grep sidekiq

© www.soinside.com 2019 - 2024. All rights reserved.