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
@simonsigre

This comment has been minimized.

Copy link

@simonsigre simonsigre commented Jul 20, 2017

This line looks to be incorrect

setup as service: wget supervisord.service -O /usr/lib/systemd/system/supervisord.service
@Krato

This comment has been minimized.

Copy link

@Krato Krato commented Aug 9, 2017

Yes this line is incorrect

@hcira

This comment has been minimized.

Copy link

@hcira hcira commented Oct 24, 2017

Copy content from file below ;)

@vafrcor

This comment has been minimized.

Copy link

@vafrcor vafrcor commented Dec 22, 2017

any fix about this error?

@skecskes

This comment has been minimized.

Copy link

@skecskes skecskes commented Dec 31, 2017

Thanks for sharing. Guys, the third step is says to download file, but path is missing. Either use full path:
wget https://gist.githubusercontent.com/mozillazg/6cbdcccbf46fe96a4edd/raw/2f5c6f5e88fc43e27b974f8a4c19088fc22b1bd5/supervisord.service -O /usr/lib/systemd/system/supervisord.service
or create the file with above content in folder: /usr/lib/systemd/system/supervisord.service

@aleksandrychev

This comment has been minimized.

Copy link

@aleksandrychev aleksandrychev commented Feb 4, 2018

Thanks a lot! Works fine!

@alioguzhan

This comment has been minimized.

Copy link

@alioguzhan alioguzhan commented Feb 7, 2018

Thanks. One thing -> You may need to run systemctl daemon-reload before running systemctl start supervisord

@HouCoder

This comment has been minimized.

Copy link

@HouCoder HouCoder commented Aug 21, 2018

Thanks, this post is VERY helpful.

@michielgerritsen

This comment has been minimized.

Copy link

@michielgerritsen michielgerritsen commented Sep 12, 2018

I had to change ;[include] to [include] for this to work.

@bllli

This comment has been minimized.

Copy link

@bllli bllli commented Feb 19, 2019

@michielgerritsen I had to change ;[include] to [include] for this to work.

fix mine
thank you

@wweeder

This comment has been minimized.

Copy link

@wweeder wweeder commented Apr 2, 2019

Ty, very useful. Saved me from a headache.

@farlandliu

This comment has been minimized.

Copy link

@farlandliu farlandliu commented Apr 10, 2019

nice, thank you!

@secsilm

This comment has been minimized.

Copy link

@secsilm 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

This comment has been minimized.

Copy link

@marcoxsurf 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

This comment has been minimized.

Copy link

@kenzouno1 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

This comment has been minimized.

Copy link

@aramhamidi 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 ??

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