supervisor 的配置文件的使用

本文不陈述配置文件中的参数,而是关于配置文件的使用,强调2点

1. 对于supervisor 而言,配置文件在不手动指定的情况下   -c  参数

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

所以要小心配置文件被错误使用


2. supervisorctl 与supervisord 进程进行通讯默认使用的是 tcp 连接

[inet_http_server]
port = 127.0.0.1:9001
username = user
password = 123

但是出于安全考虑很多人使用的是unix域套接字,

[unix_http_server]
file = /tmp/supervisor.sock
chmod = 0777
chown= nobody:nogroup
username = user
password = 123

所以在使用supervisorctl 时,如果supervisorctl 无法查找到配置文件,

supervisorctl  无法获知与supervisord 该如何通讯,你可能会看到如下错误

root@xxx:/home/operation# supervisorctl status
http://localhost:9001 refused connection

3. supervisorctl  支持

(sm_env)root@xxx:/etc/supervisor# supervisorctl help

default commands (type help <topic>):
=====================================
add    clear  fg        open  quit    remove  restart   start   stop  update 
avail  exit   maintail  pid   reload  reread  shutdown  status  tail  version

root@xxx:/etc/supervisor# supervisorctl help update
update		Reload config and add/remove as necessary


参考官方文档:

The Supervisor configuration file is conventionally named supervisord.conf. It is used by bothsupervisord 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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值