Running supervisor 3 on CentOS 5

It’s been a long time since the last time I checked the available software for managing long running processes. Software in this particular area has evolved and, after some research and testing on a virtual machine, I tried to install supervisord in a CentOS 5.6 box. Unfortunately, no RPM package exists for the latest 3.X version, so I decided to go through the procedure to rebuild the supervisor RPM from the Fedora development tree, since v3.X has some really cool features I cannot do without.

If you haven’t built an RPM package before, you will need to go through a simple procedure in order to prepare an RPM building environment. It is highly recommended that you build your packages in a separate box, dedicated to this kind of work, and also use a typical user and not root for building. So, let’s get the source RPM of supervisord from a Fedora Rawhide mirror:


The simplest way to build an RPM for our CentOS release is to use the --rebuild option of rpmbuild:

rpmbuild --rebuild supervisor-3.0-0.4.a10.fc16.src.rpm

Wait a few seconds for it to finish and then your binary RPM package will be in ~/<your_building_env>/RPMS/....

To satisfy dependencies, you will also need the package python-meld3. So, download and rebuild it:

rpmbuild --rebuild python-meld3-0.6.7-4.fc16.src.rpm

Having built RPM packages for supervisor and python-meld3, you can now transfer them to a testing box and install them:

yum localinstall /path/to/supervisor.rpm /path/to/python-meld3
yum install python-elementtree

We also installed elementtree as this is a dependency missing from the supervisor spec file (note to self: file a bug report).

Finally, try to start supervisord:

/etc/init.d/supervisord start

Surprisingly, it complains about the missing elementtree!

Starting supervisord: Traceback (most recent call last):
  File "/usr/bin/supervisord", line 5, in ?
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.4/site-packages/", line 2479, in ?
  File "/usr/lib/python2.4/site-packages/", line 585, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.4/site-packages/", line 483, in resolve
    raise DistributionNotFound(req)  # put more info here
pkg_resources.DistributionNotFound: elementtree

Checking the requirements file at: /usr/lib/python2.4/site-packages/supervisor-3.0a10-py2.4.egg-info/requires.txt there are no special version requirements:

meld3 >= 0.6.5

cElementTree >= 1.0.2

After some investigation on the supervisor-users mailing list, I found a message that indicated that setuptools.setup() should be used instead of distutils.core.setup() in the script.

So, the dependency resolution depends on the way the package has been installed! I didn’t even bother to patch… Knowing that the dependencies are correctly installed, I commented out the elementtree line and also the meld3 line as this caused the same error.

So, my /usr/lib/python2.4/site-packages/supervisor-3.0a10-py2.4.egg-info/requires.txt file looks like this:

#meld3 >= 0.6.5

cElementTree >= 1.0.2

Now supervisor starts without errors:

# /etc/init.d/supervisord start
Starting supervisord:                                      [  OK  ]
# cat /var/log/supervisor/supervisord.log
2011-05-12 02:56:08,221 CRIT Supervisor running as root (no user in config file)
2011-05-12 02:56:08,267 INFO RPC interface 'supervisor' initialized
2011-05-12 02:56:08,267 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2011-05-12 02:56:08,271 INFO daemonizing the supervisord process
2011-05-12 02:56:08,272 INFO supervisord started with pid 21337

This is what it takes to run supervisord 3 in CentOS 5 or RHEL 5. If you have any comments and suggestions, please let me know in the comments below.

Running supervisor 3 on CentOS 5 by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at Licensing Information.
Copyright © 2011 - Some Rights Reserved

George Notaras avatar

About George Notaras

George Notaras is the editor of G-Loaded Journal, a technical blog about Free and Open-Source Software. George, among other things, is an enthusiast self-taught GNU/Linux system administrator. He has created this web site to share the IT knowledge and experience he has gained over the years with other people. George primarily uses CentOS and Fedora. He has also developed some open-source software projects in his spare time.

5 responses on “Running supervisor 3 on CentOS 5

  1. George Notaras Post authorPermalink →

    Nils, thanks for your feedback. I had actually used the procedure you described (rpm -i –nomd5 to extract the srpm contents to the appropriate directories in the rpmbuild tree and then rpmbuild -ba to create the packages), but in order to make it simpler for the readers I used the rpmbuild --rebuild option in the post. That was a bad choice, because I completely forgot about the md5 issue in C5 and thus the instructions were not accurate. Thanks for pointing this out.

  2. Nils Breunese Permalink →

    Thanks for these instructions!

    The fc16 rawhide package is no longer available, but I used this rpm (note: link down) instead. (Once Fedora 16 is released, this link will probably also die, but you should be able to get the SRPM from the Fedora 16 release repository after that date.)

    The rpmbuild –rebuild command also failed on our CentOS 5 build server with an MD5 error, which seems to be caused by the newer RPM format used in Fedora. As a workaround I used a combination of ‘rpm -i –nomd5’ and ‘rpmbuild -bb’ instead:

    $ wget (note: link down)
    $ rpm -i --nomd5 supervisor-3.0-0.5.a10.fc16.src.rpm
    $ rpmbuild -bb ~/rpmbuild/SPECS/supervisor.spec
  3. Pim Permalink →

    Thank you Richard, that is just awesome!
    Just wondering, is the EL6 supervisor package still maintained?