unix:///tmp/supervisor.sock没有这样的文件

问题描述 投票:3回答:6

使用Ubuntu 16.04 LTS部署我的python应用程序。已配置所有内容,并且应用程序正在手动运行我想与主管自动化,我已经安装了主管并对其进行了配置。但如果我跑:

主管配置文件:

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

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

supervisorctl reread我最终得到了unix:///tmp/supervisor.sock no such file

supervisord状态正在运行,

请有任何想法的人。

unix supervisord supervisor unix-socket
6个回答
1
投票

最后通过在删除supervisor中的所有配置文件后重新安装/etc/supervisor/conf.d/解决了这个问题。


1
投票

Ubuntu管理程序包(3.3.1-1.1)在/etc/supervisor/supervisord.conf中有配置文件。

由于某种原因(我不知道为什么),/etc/supervisord.conf中似乎有另一个配置文件,而supervisorctl更喜欢该文件。

您可以将配置文件位置显式定义到supervisorctl:

sudo supervisorctl -c /etc/supervisor/supervisord.conf reread

或者只是删除/etc/supervisord.conf


1
投票

我有同样的问题。阅读man supervisorctl手册后,我意识到默认文件是/etc/supervisord.conf,它在ubuntu中位于/etc/supervisor/supervisord.conf。我用以下方法创建了一个符号链接:

sudo ln -s  /etc/supervisor/supervisord.conf /etc/supervisord.conf

这解决了我的问题。


0
投票

可能其中一个配置文件有语法错误。

例如,验证是否缺少[program]子句

删除conf.d目录中的每个文件并重新启动supervisor以隔离有问题的文件。


0
投票

运行此命令sudo service supervisord restart解决了我的问题。


-1
投票

得到这个的原因:有多种原因,我发现我的主管因服务器因电源跳闸而不断下降而损坏。

解决方案:首先删除主管,然后重新安装。

脚步:

sudo apt-get remove supervisor

sudo apt-get remove --auto-remove supervisor

sudo apt-get purge supervisor

sudo apt-get purge --auto-remove supervisor

上面的链接可以在这里找到:

https://www.howtoinstall.co/en/ubuntu/trusty/supervisor?action=remove

© www.soinside.com 2019 - 2024. All rights reserved.