Mil*_*ano 2 linux ubuntu supervisord ubuntu-16.04
我不知道如何supervisorctl正确运行。有一个supervisord我上运行的Ubuntu 16.04服务器。
该supervisord.conf路径:
/home/django/Bedueno/supervisord.conf
Run Code Online (Sandbox Code Playgroud)
当我跑
supervisorctl
Run Code Online (Sandbox Code Playgroud)
或者
supervisorctl -c /home/django/Bedueno/supervisord.conf
Run Code Online (Sandbox Code Playgroud)
控制台返回
django@Bedueno-beta-ubuntu-512mb-fra1-01:~$ supervisorctl -c /home/django/Bedueno/supervisord.conf
http://localhost:9001 refused connection
supervisor> reread
error: <class 'socket.error'>, [Errno 111] Connection refused: file: /usr/lib/python2.7/socket.py line: 575
supervisor>
Run Code Online (Sandbox Code Playgroud)
已经尝试过sudo没有帮助。
你知道问题出在哪里吗?
配置文件
[program:daphne]
command=/home/django/Bedueno/beduenovenv/bin/daphne Bedueno.asgi:channel_layer --bind 0.0.0.0 -p 8001 ;
directory=/home/django/Bedueno/ ;
autostart=true ;
autorestart=true ;
[program:daphne_worker]
command=/home/django/Bedueno/beduenovenv/bin/python manage.py runworker ;
directory=/home/django/Bedueno/ ;
autostart=true ;
autorestart=true ;
[supervisord]
[supervisorctl]
Run Code Online (Sandbox Code Playgroud)
编辑
我意识到我有两个 supervisord.pid 和 supervisord.log 文件。它们都在/tmp/目录中,/home/django/Bedueno/也在目录中。supervisor.sock仅在/tmp/目录内。
如果您使用的是 http 方法,请务必检查以下内容:
supervisord正在运行在supervisord.conf文件中启用(未注释)这些:
a)
[inet_http_server]
port=127.0.0.1:9001
Run Code Online (Sandbox Code Playgroud)
b)
[supervisorctl]
serverurl=http://127.0.0.1:9001
Run Code Online (Sandbox Code Playgroud)
C)
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
Run Code Online (Sandbox Code Playgroud)注意: inet 服务器的主机和端口与 supervisorctl 尝试连接的主机和端口应该相同。