Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
User=root
[Install]
WantedBy=multi-user.target
  1. install: pip install supervisor
  2. configure:
    1. mkdir -p /etc/supervisord/conf.d
    2. echo_supervisord_conf > /etc/supervisord/supervisord.conf
    3. echo "files = conf.d/*.conf" >> /etc/supervisord/supervisord.conf
  3. setup as service: wget supervisord.service -O /usr/lib/systemd/system/supervisord.service
  4. start service systemctl start supervisord
  5. view service status: systemctl status supervisord
  6. auto start service on system startup: systemctl enable supervisord
@farlandliu
Copy link

farlandliu commented Apr 10, 2019

nice, thank you!

@secsilm
Copy link

secsilm commented Apr 23, 2019

It's helpful. Thank you!

BTW, let me sum it up, If you failed with the message:

Job for supervisord.service failed because the control process exited with error code.

You can try these steps:

  1. change ;[include] to [include] in supervisord.service
  2. change /bin/supervisord and /bin/supervisorctl to your own location in supervisord.service, if your supervisor is not installed in this location. You can use which supervisord and which supervisorctl to check your own location.
  3. systemctl daemon-reload
  4. systemctl start supervisord

@marcoxsurf
Copy link

marcoxsurf commented Oct 18, 2019

command: echo_supervisord_conf > /etc/supervisord/supervisord.conf should be
echo_supervisord_conf > /etc/supervisor/supervisord.conf.
/etc/supervisord is not in the lookup dir list.

@kenzouno1
Copy link

kenzouno1 commented Nov 14, 2019

sometime supervisor on my server not working. I checking file /usr/lib/systemd/system/supervisord.service show is empty file. Can someone help me?

@aramhamidi
Copy link

aramhamidi commented Mar 19, 2020

It's helpful. Thank you!

BTW, let me sum it up, If you failed with the message:

Job for supervisord.service failed because the control process exited with error code.

You can try these steps:

  1. change ;[include] to [include] in supervisord.service
  2. change /bin/supervisord and /bin/supervisorctl to your own location in supervisord.service, if your supervisor is not installed in this location. You can use which supervisord and which supervisorctl to check your own location.
  3. systemctl daemon-reload
  4. systemctl start supervisord

I am facing this issue right now, but I am wondering, do you mean to "change ;[include] to [include] in supervisord.service" or in supervisord.conf ??

@imtiyazsizmic
Copy link

imtiyazsizmic commented Mar 9, 2022

Thanks, it's really helpful.

Who is still struggling to make this work?

Please check your folder name is it "supervisor" or "supervisord", notice "d" at last.

You need to check the folder name for all the steps under configure section of usage.md and line no. 8 under supervisord.service file

Line no 8: ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment