2017-02-11 63 views
0

啓動薄服務器的monit只是start program = "/etc/init.d/thin start"monit的和private_pub

但啓動需要private_pub或菲捆紮rackup。

以及如何停止pid?

有人有想法嗎?

check process private_pub_myapp 
    with pidfile "/home/ubuntu/myapp/shared/tmp/pids/private_pub.pid" 
    start program = "bundle exec rackup /home/ubuntu/myapp/shared/config/private_pub.ru -s thin -E production" with timeout 90 seconds 

    stop program = "kill -s TERM `cat /home/ubuntu/myapp/shared/config/private_pub.yml`" with timeout 90 seconds 
    if totalmem is greater than 200 MB for 2 cycles then restart # eating up memory? 
    group private_pub_myapp 

monit的吐出

/conf.d/private_pub.conf:3:警告:程序不存在: '捆綁' /etc/monit/conf.d/private_pub.conf :5:警告:程序不存在: 'kill'

回答

0

使用Monit時,您總是需要提供完整的絕對路徑。例如start program = "/usr/local/bin/bundle exec ..."等。這就是說,我懷疑這仍然行不通。您似乎試圖捕獲配置YAML來查找要殺死的PID,這可能是一個複製粘貼問題,您需要確保您的機架配置實際上是寫出PID文件。

+0

謝謝。我要檢查一下 – japow23