2017-05-28 136 views
1

所以我安裝了主管,它似乎在運行。 我已經把我的配置文件隊列工人/etc/supervisor/conf.d/laravel-worker.conf啓動supervisorctl在laravel隊列工作進程上給出錯誤(產生錯誤)

而且它看起來像這樣

[program:laravel-worker] 
process_name=%(program_name)s_%(process_num)02d 
command=php /var/www/html queue:work database --sleep=3 --tries=2 --daemon 
autostart=true 
autorestart=true 
numprocs=4 
redirect_stderr=true 
stdout_logfile=/var/www/html/storage/logs/laravel.log 

而且我supervisord.conf看起來像這樣

[unix_http_server] 
file=/var/run/supervisor.sock ; (the path to the socket file) 
chmod=0775      ; sockef file mode (default 0700) 
chown=root 

[supervisord] 
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) 
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) 
childlogdir=/var/log/supervisor   ; ('AUTO' child log dir, default $TEMP) 

; the below section must remain in the config file for RPC 
; (supervisorctl/web interface) to work, additional interfaces may be 
; added by defining them in separate rpcinterface: sections 
[rpcinterface:supervisor] 
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 

[supervisorctl] 
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket 

; The [include] section can just contain the "files" setting. This 
; setting can list multiple files (separated by whitespace or 
; newlines). It can also contain wildcards. The filenames are 
; interpreted as relative to this file. Included files *cannot* 
; include files themselves. 

[include] 
files = /etc/supervisor/conf.d/*.conf 

我收到錯誤 - 錯誤(產卵錯誤),當我嘗試啓動進程。

當我在看日誌文件時顯示 -

2017-05-28 22:21:20,697 INFO exited: laravel-worker_01 (exit status 0; not expected) 
2017-05-28 22:21:20,702 INFO exited: laravel-worker_00 (exit status 0; not expected) 
2017-05-28 22:21:20,704 INFO exited: laravel-worker_02 (exit status 0; not expected) 
2017-05-28 22:21:20,706 INFO exited: laravel-worker_03 (exit status 0; not expected) 
2017-05-28 22:21:23,711 INFO spawned: 'laravel-worker_00' with pid 16280 
2017-05-28 22:21:23,713 INFO spawned: 'laravel-worker_01' with pid 16281 
2017-05-28 22:21:23,715 INFO spawned: 'laravel-worker_02' with pid 16282 
2017-05-28 22:21:23,719 INFO spawned: 'laravel-worker_03' with pid 16283 
2017-05-28 22:21:23,772 INFO exited: laravel-worker_02 (exit status 0; not expected) 
2017-05-28 22:21:23,774 INFO gave up: laravel-worker_02 entered FATAL state, too many start retries too quickly 
2017-05-28 22:21:23,774 INFO exited: laravel-worker_01 (exit status 0; not expected) 
2017-05-28 22:21:23,776 INFO gave up: laravel-worker_01 entered FATAL state, too many start retries too quickly 
2017-05-28 22:21:23,776 INFO exited: laravel-worker_03 (exit status 0; not expected) 
2017-05-28 22:21:23,777 INFO gave up: laravel-worker_03 entered FATAL state, too many start retries too quickly 
2017-05-28 22:21:23,777 INFO exited: laravel-worker_00 (exit status 0; not expected) 
2017-05-28 22:21:24,778 INFO gave up: laravel-worker_00 entered FATAL state, too many start retries too quickly 

我已驗證我的配置文件中的所有文件是否存在。我不確定我在我的laravel-worker.conf中使用了正確的配置。我已搜查文件和其他計算器線程,但無法通過添加「/工匠」的路徑,像這樣找到解決

回答

1

所以,問題顯然與我的laravel工人 我需要完成的命令路徑 -

[program:laravel-worker] 
process_name=%(program_name)s_%(process_num)02d 
command=php /var/www/html/artisan queue:work database --sleep=3 --tries=2 --daemon