laravel - 为什么我收到这个错误 laravel-worker : ERROR (no such group)

标签 laravel queue centos7 supervisord

我跟随官方 Laravel 文档到 使用主管在后台启动队列 在 Centos 7.

但是当我运行此命令时 sudo supervisorctl start laravel-worker:*我收到此错误 laravel-worker: ERROR (no such group)
文档 :
https://laravel.com/docs/5.5/queues#supervisor-configuration

最佳答案

我对其进行了测试并创建了一个完全没有主管配置的新服务器。这些是我让它运行的步骤:

# 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.d/laravel-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

关于laravel - 为什么我收到这个错误 laravel-worker : ERROR (no such group),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54811044/

相关文章:

java - 何时清理ReferenceQueue?被系统清理了?

linux - free -g 与 sed -n 加第 n 个字符

docker - 无法推送 docker Image net/http : HTTP/1. x 传输连接断开:

php - 在函数中两次使用 Config::set() 的方法

php - 具有多个模型的 Jwt

image - 在 Laravel 中存储照片。迁移文件的结构

algorithm - 使用前缀制作特定的计数系统

php - 如何验证以太坊地址 PHP/Laravel?

java - 使用 IBM MQ 类浏览、读取和删除队列中的消息

kubernetes - Kubeadm和在主节点上调度Pod的风险(Pod始终处于等待状态)