Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisor - Invalid user name [closed]

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...

like image 776
general666 Avatar asked Nov 29 '22 08:11

general666


2 Answers

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
like image 121
leopinzon Avatar answered Dec 01 '22 21:12

leopinzon


I solved it. Needed to define user in test.conf and now it's working.

like image 35
general666 Avatar answered Dec 01 '22 23:12

general666