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:
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 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
Sometimes supervisor configuration file is not automatically generated after installation and you have to write it manually:
echo_supervisord_conf > /etc/supervisord.conf
sudo supervisord -c /etc/supervisord.conf
sudo supervisorctl status