Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
347 views
in Technique[技术] by (71.8m points)

supervisord - Supervisorctl not respecting my configuration

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 -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.

question from:https://stackoverflow.com/questions/17005404/supervisorctl-not-respecting-my-configuration

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 both supervisord and supervisorctl. 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.

  1. $CWD/supervisord.conf
  2. $CWD/etc/supervisord.conf
  3. /etc/supervisord.conf

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...