我試圖在CentOS服務器上重新啓動我的sidekiq服務。在嘗試了多種解決方案後,我很難入手,仍然無法啓動服務。從monit.dMonit無法重新啓動sidekiq
我sidekiq文件:
check process sidekiq
with pidfile /var/www/App/tmp/pids/sidekiq.pid
start program = "/bin/bash -l -c 'sudo cd /var/www/App && bundle exec sidekiq --index 0 --pidfile /var/www/App/tmp/pids/sidekiq.pid --environment production --logfile /var/www/App/log/sidekiq.log --daemon'" as uid deploy and gid deploy
stop program = "/bin/bash -l -c 'cd /var/www/App && bundle exec sidekiqctl stop /var/www/App/tmp/pids/sidekiq.pid 10'" as uid deploy and gid deploy
if totalmem is greater than 512 MB for 2 cycles then restart
if 3 restarts within 5 cycles then timeout
如果我手動運行啓動程序的命令,它會啓動sidekiq罰款,但monit的似乎並沒有做任何事情。只是想出了:
[BST Oct 6 11:51:17] error : 'sidekiq' process is not running
[BST Oct 6 11:51:17] info : 'sidekiq' trying to restart
[BST Oct 6 11:51:17] info : 'sidekiq' start: /bin/bash
[BST Oct 6 11:52:47] error : 'sidekiq' failed to start
所以它是包括文件罰款,但不知何故不管理開始從腳本服務。
它可能是什麼?一些權限問題的種類?