简体   繁体   中英

Monit fails to stop sidekiq 6

I am upgrading to sidekiq6 we use monit. As sidekiq6 does not support PID( https://github.com/mperham/sidekiq/wiki/Deployment#running-your-own-process )file I am trying to stop using https://github.com/ajgon/opsworks_ruby/blob/master/templates/default/sidekiq.monitrc.erb .

Its not stopping on monit stop/restart etc .

[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

If I run following on console it kills the job. 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

Please let me know what mistake I am doing here...

它的工作感谢而不是 grep "bundle exec sidekiq" 我使用了没有双引号的 grep sidekiq

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM