我启动了一个Debian docker容器,安装了supervisosrd并启动它。
/usr/bin/supervisord -c /etc/supervisord.conf
当连接到容器并通过supervisorctl检查状态时,我发现supervisorctl只能在 / 上运行。
以下是错误消息。
root@abcdd:~# docker exec -it 1a52 bash
root@1a52e1e42a0d:/# supervisorctl
mongodb RUNNING pid 14, uptime 0:48:50
supervisor>
root@1a52e1e42a0d:/# cd /opt/
root@1a52e1e42a0d:/opt# supervisorctl
unix:///var/run/supervisor.sock no such file
这是我的supervisord.conf。
[unix_http_server]
file=/tmp/supervisor.sock
[supervisord]
nodaemon=true
logfile=/tmp/supervisord.log
pidfile=/tmp/supervisord.pid
logfile_maxbytes=5MB
logfile_backups=10
loglevel=info
minfds=1024
minprocs=200
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:mongodb]
command = /monstor/bin/startup.sh
directory = /monstor/bin
autostart = true
autorestart = true
startsecs = 16
startretries = 5
redirect_stderr = true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stopasgroup=true
killasgroup=true
如何在任何地方设置supervisorctl运行?感谢。