Error Supervisorctl: unix: ///var/run/supervisord.sock connection failed?

This is my config flie.I ran supervisord -c /etc/supervisor/supervisord.conf , it works well. When I try to run supervisorctl -c /etc/supervisor/supervisord.conf , an error occurred:

Error :, Unknown protocol for serverurl / var / run / supervisord.sock: file: /usr/local/lib/python2.7/dist-packages/supervisor-3.0b2-py2.7.egg/supervisor/xmlrpc.py line : 440

I can start or stop my program through http://127.0.0.1:9001 perfectly, but I want to control the program on the command line. Can anyone help me?

 [unix_http_server] file = /var/run/supervisor.sock chmod = 0777 chown= root:cruelcage [inet_http_server] port=9001 username = cruelcage password = 123 [supervisorctl] serverurl = /var/run/supervisord.sock [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisord] logfile=/home/cruelcage/log/supervisord/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=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) nodaemon=true ; (start in foreground if true;default false) minfds=1024 ; (min. avail startup file descriptors;default 1024) minprocs=200 ; (min. avail process descriptors;default 200) #user=root ; (default is current user, required if root) childlogdir=/home/cruelcage/log/supervisord/ ; ('AUTO' child log dir, default $TEMP) [program:config] command=python /home/cruelcage/documents/config/config.py autostart = true startsecs = 5 user = cruelcage redirect_stderr = true stdout_logfile_maxbytes = 20MB stdoiut_logfile_backups = 20 stdout_logfile = /home/cruelcage/log/debug.log 
+7
unix supervisord supervisor
source share
3 answers

Your [supervisorctl] serverurl must be " unix: // /var/run/supervisord.sock" because "/var/run/supervisord.sock" is not a valid URI for xmlrpclib to connect to.

+8
source share
 echo_supervisord_conf > /etc/supervisord.conf sudo supervisord -c /etc/supervisord.conf sudo supervisorctl status 
+6
source share

I had this problem and it turned out that it occurred after the server was restarted. When the supervisor tried to restart later, he could not find the log directory that was specified in my daemon configuration file (this problem did not appear while the supervisor was running).

All I had to do was change the stdout_logfile path (or comment out a line) in my file:

(replace ##### for your file id)

sudo nano /etc/supervisor/conf.d/daemon-#####.conf

Add an existing path to the log file or comment out line # at the beginning of the line:

#stdout_logfile=/my/bad/log/directory

Then restart the dispatcher

sudo service supervisor restart

0
source share

All Articles