Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisor 3.3 with Ubuntu 16.04 service start failure [closed]

This morning, I have upgrade my supervisor by using

pip install --upgrade supervisor //from 3.2 to 3.3

But after that, service status notice it failure start.

supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2016-05-24 12:19:48 CST; 25s ago
Docs: http://supervisord.org
Process: 27369 ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown (code=exited, status=203/EXEC)
Process: 27366 ExecStart=/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf (code=exited, status=203/EXEC)
Main PID: 27366 (code=exited, status=203/EXEC)

May 24 12:19:48 709101111291e5cZ systemd[1]: supervisor.service: Unit entered failed state.
May 24 12:19:48 709101111291e5cZ systemd[1]: supervisor.service: Failed with result 'exit-code'.

This is my worker config:

[program:worker]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:listen --timeout=360 --queue=high,low --sleep=3 --tries=3
autostart=true
autorestart=true
exitcodes=0,2
user=www
numprocs=2
redirect_stderr=true
stdout_logfile=/www/worker/storage/logs/worker.log

Would please someone could help?

like image 238
Alex Chiang Avatar asked May 24 '16 04:05

Alex Chiang


2 Answers

I am on Ubuntu 16.04 using Supervisor 3.2 and am getting the same error when i try to start supervisor with service supervisor start.

I used apt-get install supervisor to install supervisor and it put supervisorctl and supervisord in /usr/bin/.

And my supervisor.service file is pointing at /usr/bin/. I'm stuck.

UPDATE I found the problem, it turns out there was a parsing error in one of my .conf files in /etc/supervisor/conf.d/. Once I fixed that it worked. That error was not at all clear but there is a hint as to how to find it. In there original error output there is a line like

ExecStart=/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf (code=exited, status=203/EXEC)

Run /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf from the command line and it will give you a more verbose error.

like image 186
wilblack Avatar answered Nov 16 '22 04:11

wilblack


I ran into a similar issue, where I was getting a status=2 as the exit code. There were no further clues as to what could be going wrong.

Turns out that Supervisor won't start if it's log folder doesn't exist. Since this folder was mounted on a tmpfs, after a reboot of the device, it would have been wiped again.

This caused Supervisor to not boot up (known issue: https://github.com/Supervisor/supervisor/issues/121)

As a fix, I added the following lines to my startup script:

mkdir /var/log/supervisor
sudo service supervisor restart

Now the folder gets created on startup and supervisor starts correctly.

like image 39
Adam Reis Avatar answered Nov 16 '22 02:11

Adam Reis