使用Ubuntu 16.04 LTS部署我的python应用程序。已配置所有内容,并且应用程序正在手动运行我想与主管自动化,我已经安装了主管并对其进行了配置。但如果我跑:
Supervisor配置文件:
; 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
状态正在运行,
任何有想法的人,请。
答案 0 :(得分:1)
最后通过在删除supervisor
中的所有配置文件后重新安装/etc/supervisor/conf.d/
解决了这个问题。
答案 1 :(得分:1)
我有同样的问题。阅读man supervisorctl
手册后,我意识到默认文件为/etc/supervisord.conf
,在ubuntu中该文件位于/etc/supervisor/supervisord.conf
。我使用以下符号创建了符号链接:
sudo ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf
这解决了我的问题。
答案 2 :(得分: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
。
答案 3 :(得分:0)
其中一个配置文件可能存在语法错误。
例如,验证[program]子句是否丢失
删除conf.d目录中的每个文件,然后重新启动超级用户以隔离有问题的文件。
答案 4 :(得分:0)
运行此命令sudo service supervisord restart
解决了我的问题。
答案 5 :(得分:0)
得到此消息的原因:有多种原因,我发现我的主管由于服务器因电源跳闸而连续关闭而损坏。
解决方案:先卸下主管,然后重新安装。
步骤:
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