supervisorctl 一直报xxx:xxx ERROR (no such file)

在centos上添加配置文件之后

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3
autostart=true
autorestart=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log

启动

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl start laravel-worker:*

一直报这个错误

xxx:xxx ERROR (no such file)

之前在ubuntu上没有出现这个问题

可能是 supervisorctl 的用户找不到 php 这个命令

指定 php 的完整路径,问题消失

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command= /usr/local/bin/php /home/forge/app.com/artisan queue:work sqs --sleep=3 --tries=3
autostart=true
autorestart=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log

Posted in 后端 on Nov 25, 2019

请登录 登录 评论!