2014-12-03 31 views
0

我已經成功地爲設置了一個supervisor()隊列,它在以前工作,但在更改密碼後突然發生,它不再工作。我做到了(設置)爲root用戶,但現在每當我在失敗和以下跟蹤日誌文件可在queue添加作業:主管在後臺運行,但工作立即失敗

2014-12-03 00:45:36,017 INFO RPC interface 'supervisor' initialized 
2014-12-03 00:45:36,017 CRIT Server 'unix_http_server' running without any HTTP authentication checking 
2014-12-03 00:45:36,017 INFO daemonizing the supervisord process 
2014-12-03 00:45:36,017 INFO supervisord started with pid 31309 
2014-12-03 00:45:37,022 INFO spawned: 'queue' with pid 31317 
2014-12-03 00:45:38,023 INFO success: queue entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 

眼下supervisord.conf包含以下配置:

[unix_http_server] 
file=/tmp/supervisor.sock ; (the path to the socket file) 

[supervisord] 
logfile=/tmp/supervisord.log 
logfile_maxbytes=50MB 
logfile_backups=10 
loglevel=info 
pidfile=/tmp/supervisord.pid 
nodaemon=false 
minfds=1024 
minprocs=200 

[rpcinterface:supervisor] 
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 

[supervisorctl] 
serverurl=unix:///tmp/supervisor.sock 

[program:queue] 
command=/usr/local/bin/php artisan queue:listen --tries=3 --timeout=86400 --sleep=60 

directory=/home/***/www/*** // Real path removed for this question 
autostart=true 
autorestart=true 
redirect_stderr=true 

我試過一切盡我所能,重新啓動program並重新加載supervisor幾次,但沒有運氣。我現在可以做些什麼來使其再次運作?

更新:如果我從終端手動運行php artisan queue:work然後它在前臺工作。

回答

0

嘗試

$ ps aux | grep artisan # get artisan PID 
$ sudo kill -2 <PID> 
$ ps aux | grep artisan # verify artisan has shutdown properly - if not use kill -9 in previous step 

有時supervisorctl具有關停過程中的問題。這可能是因爲進程不會偵聽SIGINT/SIGTERM,或者因爲進程已經掛起。在這兩種情況下,kill -9應該蠻力殺死它,然後你可以使用supervisorctl start program

+0

感謝您的迴應,我現在試一試,然後讓你知道結果:-) – 2014-12-03 16:29:19

+0

我試過但沒有工作: - ( – 2014-12-03 18:55:44

相關問題