gpt4 book ai didi

supervisord - Supervisorctl 不尊重我的配置

转载 作者:行者123 更新时间:2023-12-03 07:08:19 25 4
gpt4 key购买 nike

我在/home/david/conf/supervisor.conf中设置了以下内容:

[unix_http_server]
file=/home/david/tmp/supervisor.sock

[supervisord]
logfile=/home/david/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/home/david/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200
childlogdir=/home/david/tmp

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

[supervisorctl]
serverurl=unix:///home/david/tmp/supervisor.sock

并开始 :

$ supervisord -c /home/david/conf/supervisor.conf

但是为什么supervisorctl仍然使用默认的http://localhost:9001作为serverurl

$ supervisorctl
http://localhost:9001 refused connection
supervisor>

我检查了 /home/david/tmp 并且文件 supervisord.logsupervisord.pid 确实存在。

最佳答案

您还应该使用 -c 运行 supervisorctl。来自文档(我的重点):

The Supervisor configuration file is conventionally named supervisord.conf. It is used by both supervisord and supervisorctl. If either application is started without the -c option (the option which is used to tell the application the configuration filename explicitly), the application will look for a file named supervisord.conf within the following locations, in the specified order. It will use the first file it finds.

  1. $CWD/supervisord.conf
  2. $CWD/etc/supervisord.conf
  3. /etc/supervisord.conf

关于supervisord - Supervisorctl 不尊重我的配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17005404/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com