47

I installed supervisor on ubuntu server 16.04.

$ sudo apt-get install supervisor
$ sudo update-rc.d supervisor defaults

After rebooting, supervisor didn't get started automatically. Checked the status:

qinking126@nas:~$ sudo service supervisor status
[sudo] password for qinking126:
● supervisor.service - Supervisor process control system for UNIX
   Loaded: loaded (/lib/systemd/system/supervisor.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: http://supervisord.org

I'm not sure why it's inactive (dead). What do I need to check to get it fixed?

2
  • 2
    Looks like you're using systemd. Does this askubuntu answer help?
    – Jeff Schaller
    May 8, 2016 at 0:31
  • 1
    @JeffSchaller thank you so much. it helps. all i need is to run "systemctl enable SERVICE.service"
    – qinking126
    May 8, 2016 at 1:38

6 Answers 6

65

I am convinced that this issue is a packaging bug in the Supervisor package in Ubuntu 16.04 and it seems to have been caused by the switch to systemd:

  • This issue was already reported upstream on the Supervisor project's issue tracker (where nothing can be fixed) in issue 735.

  • I was bitten by this issue a few days ago and was astonished to find that this issue was never reported to the package maintainers, even though Ubuntu 16.04 was released quite a while ago and this breaks backwards compatibility and expected behavior. This is why I decided to report this issue to the package maintainers in bug 1594740.

I documented a simple workaround in bug 1594740 that doesn't require any configuration files to be created - you just need to enable and start the Supervisor daemon after installation of the package:

# Make sure Supervisor comes up after a reboot.
sudo systemctl enable supervisor

# Bring Supervisor up right now.
sudo systemctl start supervisor

I'm not so sure that this will be fixed in Ubuntu 16.04 but at least now there's a central place to gather complaints and document workarounds (in bug 1594740, not in issue 735).

If anyone was bitten by this issue, consider voicing your concern in bug 1594740 to convince the package maintainers to fix this issue. Thanks!

Update (2017-03-24): Yesterday a fix for this issue was released to xenial-updates as a result of bug 1594740 so new installations should no longer run into this issue.

0
12

see here Running supervisord automatically on startup

  1. Create supervisord.service file in /usr/lib/systemd/systemand put following content into this file depending on system:

    initscripts

  2. sudo systemctl daemon-reload

  3. sudo systemctl enable supervisord.service

  4. sudo systemctl start supervisord.service

2
5

I have removed the supervisor and installed again. Then it worked for me.

sudo apt-get purge supervisor
sudo apt-get install supervisor
cp path/to/file.conf /etc/supervisor/conf.d/
sudo supervisorctl reread
sudo supervisorctl update
1
  • This worked for me! Jun 28, 2021 at 21:30
1

Here's a example of a file where you can put in your /lib/systemd/system/

[Unit]
Description=Supervisord Service

[Service]
Restart=on-failure
RestartSec=42s
User=ubuntu
ExecStart=/usr/local/bin/supervisord -n -c /etc/supervisord.conf

[Install]
WantedBy=multi-user.target
3
  • the default ubuntu config location is at /etc/supervisord/supervisord.conf Jun 4, 2016 at 20:29
  • @AnttiHaapala Not for my ubuntu 16.04 install. The correct location is: /etc/supervisor/supervisord.conf (note lack of "d" if anybody is wondering)
    – FinDev
    Oct 11, 2016 at 21:04
  • @Yoshi9143 you're correct :D Oct 12, 2016 at 4:00
1

apt-get install supervisor on Ubuntu 16.04.2, installs the supervisor 3.2.0 and it starts automatically on reboot.

pip install supervisor --upgrade upgrades to 3.3.1 and it does not start any more at all.

The upgrade works Ubuntu 16.04.1

1
  • This is the correct answer, although @anjaneyulubatta505 response was also helpful.
    – mindtonic
    Mar 17, 2020 at 13:05
0

On CentOS i solved it by running a cron job on startup that runs supervisord:

to Create the cron job run crontab -e in the terminal and then paste @reboot /bin/supervisord(it must be path to the supervisord) at the end of the jobs and save it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .