Supervisord 无法在 CentOS 5.9 上启动 CouchDB 服务器

Supervisord 无法在 CentOS 5.9 上启动 CouchDB 服务器

我已经安装了 CouchDB v1.0.4,我想用 Supervisor 监控它的进程(安装的版本是 2.1.3)。我可以用以下命令启动 CouchDB:

$ /usr/bin/couchdb

我对其有以下基本配置/etc/supervisord.d

[program:couchdb]
command=/usr/bin/couchdb

但是当我启动时supervisord它不会couchdb按预期启动。错误日志/var/log/supervisor/supervisord.log只是确认启动后该进程存在:

2014-09-25 13:34:10,990 INFO /var/tmp/supervisor.sock:Medusa (V1.1.1.1) started at Thu Sep 25 13:34:10 2014
        Hostname: <unix domain socket>
        Port:/var/tmp/supervisor.sock
2014-09-25 13:34:11,024 CRIT Running without any HTTP authentication checking
2014-09-25 13:34:11,024 INFO daemonizing the process
2014-09-25 13:34:11,025 INFO supervisord started with pid 8258
2014-09-25 13:34:11,037 INFO spawned: 'couchdb' with pid 8259
2014-09-25 13:34:11,044 INFO exited: couchdb (exit status 1; not expected)
2014-09-25 13:34:11,044 INFO received SIGCLD indicating a child quit
2014-09-25 13:34:12,051 INFO spawned: 'couchdb' with pid 8269
2014-09-25 13:34:12,274 INFO exited: couchdb (exit status 1; not expected)
2014-09-25 13:34:12,274 INFO received SIGCLD indicating a child quit
2014-09-25 13:34:14,299 INFO spawned: 'couchdb' with pid 8297
2014-09-25 13:34:14,300 INFO exited: couchdb (exit status 1; not expected)
2014-09-25 13:34:14,300 INFO received SIGCLD indicating a child quit
2014-09-25 13:34:18,319 INFO spawned: 'couchdb' with pid 8306
2014-09-25 13:34:18,320 INFO exited: couchdb (exit status 1; not expected)
2014-09-25 13:34:18,320 INFO received SIGCLD indicating a child quit
2014-09-25 13:34:19,320 INFO gave up: couchdb entered FATAL state, too many start retries too quickly

我真的不知道为什么会这样,因为没有记录任何错误/var/log/couchdb/couch.log(CouchDB 的日志级别设置为debug)。

任何帮助将不胜感激。

答案1

你必须在supervisord配置中为couchdb设置环境$HOME

environment=HOME=/usr/local/var/lib/couchdb redirect_stderr=true

相关内容