supervisor 启动报错 error: , [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

supervisor 启动报错 error: , [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

supervisor 启动报错

在Ubuntu下启动supervisor的时候,不管是supervisorctl start 、reload总是报如下错误:

error: <class ‘socket.error’>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

检查了下配置文件supervisord.conf,发现没有指定运行用户,所以才会报错:

[program:test]
command = uwsgi --ini /var/test/test.ini
stopsignal=QUIT
autostart=true
autorestart=true
stdout_logfile=/var/test/supervisor.log
redirect_stderr=true

在配置中指定运行用户

user=www-data
或者用
sudo supervisorctl reload
命令运行即可解决问题:
[program:test]
user=www-data
command = uwsgi --ini /var/test/test.ini
stopsignal=QUIT
autostart=true
autorestart=true
stdout_logfile=/var/test/supervisor.log
redirect_stderr=true
Comments are closed.