下面是我的 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