supervisord 启动 carbon-cache.py失败的问题

2017-10-19 11:57:01,265 INFO exited: up_carbon (exit status 1; not expected)
2017-10-19 11:57:01,265 DEBG received SIGCLD indicating a child quit
2017-10-19 11:57:02,266 INFO gave up: up_carbon entered FATAL state, too many start retries too quickly

搭建好graphite-web之后,想将carbon-cache.py的启动命令由supervisord进行管理。

但是发现carbon-cache.py start 命令直接就是守护进程。没有办法由supervisord进行监控状态。

有没有办法,可以将carbon-cache.py取消守护模式呢?就像nginx的daemon off一样配置。

在线等,求大神指点

阅读 3.7k
1 个回答

自我回答一下

# /usr/bin/python /opt/graphite/bin/carbon-cache.py --help
Usage: carbon-cache.py [options] <start|stop|status>

Options:
  -h, --help            show this help message and exit
  --debug               Run in the foreground, log to stdout
  --syslog              Write logs to syslog
  --nodaemon            Run in the foreground
  --profile=PROFILE     Record performance profile data to the given file
  --profiler=PROFILER   Specify the profiler to use
  --pidfile=PIDFILE     Write pid to the given file
  --umask=UMASK         Use the given umask when creating files
  --config=CONFIG       Use the given config file
  --whitelist=WHITELIST
                        Use the given whitelist file
  --blacklist=BLACKLIST
                        Use the given blacklist file
  --logdir=LOGDIR       Write logs in the given directory
  --instance=INSTANCE   Manage a specific carbon instance

从帮助中找到这个命令参数,可以取消守护模式,运行到前台,这样就可以顺利使用supervisord进行监控了
--nodaemon Run in the foreground

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题