I'm trying to run supervisor on Ubuntu 16.04. There was no problem in installation. I created file /etc/supervisor/conf.d/test.conf
[program:test]
process_name=%(program_name)s_%(process_num)02d
command=php /data/web/test.com/web/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/data/web/test.com/web/storage/logs/workers.log
But when I run command
supervisorctl reread
I'm getting following error:
ERROR: CANT_REREAD: Invalid user name forge in section 'program:test' (file: '/etc/supervisor/conf.d/test.conf')
Any ideas what's wrong? Tried to search for solution but still not working...
The user
is not a mandatory field in the Supervisor process config file, you can just comment the line with ;
if you don't need a specific user to run the task.
For example in a laravel artisan command:
[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
I solved it. Needed to define user in test.conf and now it's working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With