【发布时间】:2013-08-03 05:59:00
【问题描述】:
下面是我的 supervisord.conf 文件。有人会认为它会启动 zookeeper,但事实并非如此。
如果我运行 sh /var/chef/cache/zookeeper-3.4.5/bin/zkServer.sh start-foreground,ZK 会手动工作
# -*- conf -*-
[include]
files = *.supervisor
[supervisord]
pidfile = /var/run/supervisord.pid
nodaemon=false
[supervisorctl]
serverurl=unix:///var/run/supervisord.sock ; use a unix:// URL for a unix socket
[unix_http_server]
file = /var/run/supervisord.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:zookeeper]
command= sh /var/chef/cache/zookeeper-3.4.5/bin/zkServer.sh start-foreground
process_name=%(program_name)s
autostart=true
autorestart=true
stdout_logfile=/var/log/zookeeper.log
stopsignal=KILL
#stopasgroup = true
#killasgroup = true
#stdout_logfile = /tmp/zookeeper.out
#stderr_logfile = /tmp/zookeeper.err
pidfile = /var/run/zookeeper.pid
[group:zookeeper_server]
programs=zookeeper
【问题讨论】:
-
你可以将stdout和stderr都重定向到/var/log/zookeeper.log, command= sh /var/chef/cache/zookeeper-3.4.5/bin/zkServer.sh start-foreground > > /var/log/zookeeper.log 2>&1 .
-
您好@Tampa,您与 zookeeper 和 supervisord 的旅程如何?我正在寻找 zookeeper 的监督流程,我想知道 supervisord 是否可行,尽管在 zookeeper 网站上,它提到了 daemontools。
标签: apache-zookeeper supervisord