Supervisor 3.3 with Ubuntu 16.04 Service Launch Failure

This morning I updated my supervisor using

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

But after that, the status of the service reports the beginning of the failure.

 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 working configuration:

 [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 

Wish someone could help?

+6
source share
4 answers

I will fix the problem by editing /lib/systemd/system/supervisor.service and it is best to use the install supervisor easy_install supervisor command

 [Unit] Description=Supervisord Service [Service] ExecStart=/usr/local/bin/supervisord -n -c /etc/supervisor/supervisord.conf ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown ExecReload=/usr/local/bin/supervisorctl -c /etc/supervisor/supervisord.conf $OPTIONS reload KillMode=process Restart=on-failure RestartSec=50s [Install] WantedBy=multi-user.target 

The supervisor path was incorrect in the default setting, it was / usr / bin. but pip install will put it in / usr / local / bin.

+5
source

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

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

And my supervisor.service file points to /usr/bin/ . I am stuck.

UPDATE I found a problem, it turned out that one of my .conf files had a parsing error in /etc/supervisor/conf.d/ . Once I decided that it worked. This error is not entirely clear, but there is a hint on how to find it. 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 this will give you a more detailed error.

+11
source

I had a similar problem when I got status = 2 as an exit code. There were no more hints as to what could go wrong.

It turns out that Supervisor does not start if the log folder does not exist. Since this folder was mounted on tmpfs, after rebooting the device it would be erased again.

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

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

 mkdir /var/log/supervisor sudo service supervisor restart 

Now the folder is created at startup, and the supervisor starts correctly.

0
source

I do not know how to start the service in Ubuntu, even if it has /lib/systemd/system/supervisor.service and config right. But when you service supervisor start loaded the mask. I use tip, both apt install supervisor and easy_install supervisor , then easy_install -U supervisor . Now it has two difference versions, /usr/local/bin/supervisord --version // Version 3.3.3 until 26th,Jan,2018 /usr/bin/supervisord --version // Version 3.2.0 Ubuntu 16.04

After that, edit /lib/systemd/system/supervisor.service and /etc/init.d/supervisor , change everything /usr/bin/supervisord to /usr/local/bin/supervisord

Finally, in bash, reload the service configuration. sudo systemctl daemon-reload Now all services start the latest version of the dispatcher.

Maybe try to expose this service.

 systemctl unmask supervisor systemctl enable supervisor systemctl restart supervisor 
0
source

All Articles