Supervisorctl 错误:unix:///var/run/supervisord.sock 拒绝连接? [英] Supervisorctl error: unix:///var/run/supervisord.sock refused connection?

查看:191
本文介绍了Supervisorctl 错误:unix:///var/run/supervisord.sock 拒绝连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的配置文件.我运行 supervisord -c/etc/supervisor/supervisord.conf 它运行良好.当我尝试运行 supervisorctl -c/etc/supervisor/supervisord.conf 时,发生错误:

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

错误:,serverurl/var/run/supervisord.sock 的未知协议:文件:/usr/local/lib/python2.7/dist-packages/supervisor-3.0b2-py2.7.egg/supervisor/xmlrpc.py 行:440

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

我可以通过http://127.0.0.1:9001完美启动或停止我的程序,但我想在命令行中控制程序.有人可以帮助我吗?

I can start or stop my program through http://127.0.0.1:9001 perfectly,but I want to control the program in the command line.Anyone can 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

推荐答案

你的 [supervisorctl] serverurl 应该是 "unix:///var/run/supervisord.sock",因为/var/run/supervisord.sock"不是 xmlrpclib 连接到的有效 URI.

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

这篇关于Supervisorctl 错误:unix:///var/run/supervisord.sock 拒绝连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆