为什么我得到这个错误laravel-worker:ERROR(没有这样的组)

问题描述 投票:0回答:1

我跟随官方的Laravel文档,使用Centos 7中的主管在后台开始排队。

但是当我运行这个命令sudo supervisorctl start laravel-worker:*我得到这个错误laravel-worker: ERROR (no such group)

文档:https://laravel.com/docs/5.5/queues#supervisor-configuration

laravel queue centos7 supervisord supervisor
1个回答
5
投票

我测试了它并创建了一个没有管理员配置的新服务器。这些是我让它运行的步骤:

# 1. create the config file, see below for content
vi /etc/supervisor/conf.d/laravel-worker.conf

# 2. Reload the daemon's configuration files
supervisorctl reread
> laravel-worker: available

# 3. Reload config and add/remove as necessary
supervisorctl update
> laravel-worker: added process group

# 4. Start all processes of the group "laravel-worker"
supervisorctl start laravel-worker:*

# 5. Get status for all processes of the group "laravel-worker"
supervisorctl status laravel-worker:*
> laravel-worker:laravel-worker_00   RUNNING   pid 23758, uptime 0:00:16
> laravel-worker:laravel-worker_01   RUNNING   pid 23759, uptime 0:00:16

# 6. After a change in php sources you have to restart the queue, since queue:work does run as daemon
php artisan queue:restart
> Broadcasting queue restart signal.

/etc/supervisor/conf.的/拉Ravel-worker.conf

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

0
投票

确保配置文件的顶部正确无误。例:

[program:laravel-worker]

以下将导致您的问题:

[program: laravel-worker]
[laravel-worker]

干杯

© www.soinside.com 2019 - 2024. All rights reserved.