Running supervisorctl as non-root
November 24, 2010
By default, supervisorctl communicates with supervisord using a unix socket. This socket is only accessible to root. If you want to be able to run supervisorctl as a normal user, and thus allow the starting and stopping of individual services as that normal user, you need to change this to use http instead.
In /etc/supervisord.conf, find the supervisorctl section. Comment out the unix:// url to serverurl using a semicolon and use the http one instead. It should end up looking like this:
[supervisorctl] ;serverurl=unix:///tmp/supervisor.sock serverurl=http://127.0.0.1:9001
This means that the hudson user can now use:
supervisorctl stop bbr supervisorctl start bbr
to start and stop the gunicorn server during the code build.