Reputation: 15037
I have set the following in /home/david/conf/supervisor.conf
:
[unix_http_server]
file=/home/david/tmp/supervisor.sock
[supervisord]
logfile=/home/david/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/home/david/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200
childlogdir=/home/david/tmp
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///home/david/tmp/supervisor.sock
And started supervisord:
$ supervisord -c /home/david/conf/supervisor.conf
However how come supervisorctl
still uses the default http://localhost:9001
as the serverurl
?
$ supervisorctl
http://localhost:9001 refused connection
supervisor>
I checked /home/david/tmp
and the files supervisord.log
and supervisord.pid
do exist.
Upvotes: 41
Views: 29580
Reputation: 17719
brew
to install brew install supervisor
/usr/local/etc/supervisord.ini
and comment these lines:;[unix_http_server]
;file=/usr/local/var/run/supervisor.sock ; the path to the socket file
and uncomment these lines:
[inet_http_server] ; inet (TCP) server disabled by default
port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface
brew services restart supervisor
That's all you need.
Upvotes: 2
Reputation: 1619
As solution you can make symbolic link to the config file. Like this for Mac OS:
sudo ln -sv /usr/local/etc/supervisord.ini /etc/supervisord.conf
Upvotes: 0
Reputation: 1404
To add to the valid answer above make sure you are putting your config files for the apps you want to monitor under supervisor's config folder as a subfolder called conf.d. This will depend of what method you use to install supervisor, the default package manager or easy_install.
Upvotes: 0
Reputation: 174758
You should run supervisorctl
with -c
as well. From the documentation (my emphasis):
The Supervisor configuration file is conventionally named
supervisord.conf
. It is used by bothsupervisord
andsupervisorctl
. If either application is started without the-c
option (the option which is used to tell the application the configuration filename explicitly), the application will look for a file named supervisord.conf within the following locations, in the specified order. It will use the first file it finds.
$CWD/supervisord.conf
$CWD/etc/supervisord.conf
/etc/supervisord.conf
Upvotes: 90