centos7 安装supervisor遇到的几个坑

安装 pip install supervisor (需要安装python)

1.初始化配置文件 echo_supervisord_conf  报错
原因 需要手动创建目录
mkdir /etc/supervisor
echo_supervisord_conf > /etc/supervisor/supervisord.conf
解决方案  手动创建目录以及配置

2.supervisorctl 报错  Supervisor socket error issue

问题 error: , [Errno 111] Connection refused: file: /usr/lib64/python2.6/socket.py line: 567

解决方案
sudo supervisord -c /etc/supervisor/supervisord.conf
sudo supervisorctl -c /etc/supervisor/supervisord.conf

3.问题 localhost 9001 refused connection

解决方案
[inet_http_server]         
port=127.0.0.1:9001

[supervisorctl]
serverurl=http://127.0.0.1:9001

4.

error: , [Errno -2] Name or service not known: file: /home/slvher/python/2.7/lib/python2.7/socket.py line: 553
解决方案:
serverurl=http://127.0.0.1:9723; use an http:// url to specify an inet socket
看端口后面是否有注释;
在端口号和注释符;之间加个空格就解决了,或者删除注释

5.
Sorry, supervisord responded but did not recognize the supervisor namespace commands that supervisorctl uses to control it. Ple (lase check that the [rpcinterface:supervisor] section is enabled in the configuration file (see sample.conf). 

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

6. supervisor,interface module:atras [extras]

rpcinterface:supervisor的section不需要配置在extras中 检查rpcinterface:supervisor配置是否正确即可


附上完整配置

[include] 
files = /etc/supervisor/conf.d/*.ini 

[supervisord] 

[inet_http_server] 
port=127.0.0.1:9081 

[rpcinterface:supervisor] 
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface 

[supervisorctl] 
serverurl=http://127.0.0.1:9001 


 

你可能感兴趣的:(linux)