supervisord没有这样的过程vaultier

时间:2016-01-12 08:43:52

标签: python ubuntu supervisord

我设法在我的ubuntu服务器上安装了vaultier。要完成安装,我必须添加vaultier作为守护进程,以便在后台使用supervisord。

以下是我到目前为止所做的事情:

/etc/supervisor/conf.d/vaultier.conf

[program:vaultier-worker]
    command=/opt/vaultier/venv/bin/celery -A vaultier worker
    directory=/opt/vaultier
    environment=PATH="/opt/vaultier/venv/bin:",DJANGO_SETTINGS_MODULE="vaultier_conf"
    user=vaultier
    numprocs=1
    autostart=true
    autorestart=true
    startsecs=1
    stopwaitsecs = 600

    [program:vaultier-celerybeat]
    command=/opt/vaultier/venv/bin/celery -A vaultier beat
    directory=/opt/vaultier
    environment=PATH="/opt/vaultier/venv/bin:",DJANGO_SETTINGS_MODULE="vaultier_conf"
    user=vaultier
    numprocs=1
    autostart=true
    autorestart=true
    startsecs=1
    stopwaitsecs = 600

    [group:vaultier]
    programs=vaultier-celerybeat,vaultier-worker

更新主管使用conf:

$ supervisorctl reread
# vaultier activated
$ supervisorctl update
# added group vaultier
$ supervisorctl status vaultier:
# no such process vaultier

来自主管的错误记录:

Traceback (most recent call last):
  File "/opt/vaultier/venv/bin/celery", line 11, in <module>
    sys.exit(main())
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/__main__.py", line 30, in main
    main()
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 80, in main
    cmd.execute_from_commandline(argv)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/celery.py", line 768, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 306, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 466, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 486, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/app/utils.py", line 222, in find_app
    sym = symbol_by_name(app, imp=imp)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/bin/base.py", line 489, in symbol_by_name
    return symbol_by_name(name, imp=imp)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 96, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "/opt/vaultier/venv/local/lib/python2.7/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named vaultier

supervisord.log

2016-01-11 13:02:51,003 INFO spawned: 'vaultier-celerybeat' with pid 19028
2016-01-11 13:02:51,007 INFO spawned: 'vaultier-worker' with pid 19029
2016-01-11 13:02:52,553 INFO success: vaultier-celerybeat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-11 13:02:52,554 INFO success: vaultier-worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-12 08:02:37,285 WARN received SIGTERM indicating exit request
2016-01-12 08:02:37,285 INFO waiting for vaultier-celerybeat, vaultier-worker to die
2016-01-12 08:02:37,340 INFO stopped: vaultier-celerybeat (exit status 0)
2016-01-12 08:02:39,633 WARN received SIGTERM indicating exit request
2016-01-12 08:02:40,668 INFO waiting for vaultier-worker to die
2016-01-12 08:02:43,353 INFO stopped: vaultier-worker (exit status 0)
2016-01-12 08:03:00,065 CRIT Supervisor running as root (no user in config file)
2016-01-12 08:03:00,073 WARN Included extra file "/etc/supervisor/conf.d/vaultier.conf" during parsing
2016-01-12 08:03:00,196 INFO RPC interface 'supervisor' initialized
2016-01-12 08:03:00,196 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-01-12 08:03:00,199 INFO daemonizing the supervisord process
2016-01-12 08:03:00,200 INFO supervisord started with pid 609
2016-01-12 08:03:01,230 INFO spawned: 'vaultier-celerybeat' with pid 617
2016-01-12 08:03:01,234 INFO spawned: 'vaultier-worker' with pid 618
2016-01-12 08:03:02,255 INFO success: vaultier-celerybeat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-12 08:03:02,255 INFO success: vaultier-worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-01-12 08:03:02,520 INFO exited: vaultier-worker (exit status 1; not expected)
2016-01-12 08:03:02,529 INFO spawned: 'vaultier-worker' with pid 775
2016-01-12 08:03:02,529 INFO exited: vaultier-celerybeat (exit status 1; not expected)
2016-01-12 08:03:02,620 INFO spawned: 'vaultier-celerybeat' with pid 779
2016-01-12 08:03:02,623 INFO exited: vaultier-worker (exit status 1; not expected)
2016-01-12 08:03:02,710 INFO exited: vaultier-celerybeat (exit status 1; not expected)
2016-01-12 08:03:03,715 INFO spawned: 'vaultier-celerybeat' with pid 783
2016-01-12 08:03:03,719 INFO spawned: 'vaultier-worker' with pid 784
2016-01-12 08:03:03,815 INFO exited: vaultier-celerybeat (exit status 1; not expected)
2016-01-12 08:03:03,820 INFO exited: vaultier-worker (exit status 1; not expected)
2016-01-12 08:03:05,826 INFO spawned: 'vaultier-celerybeat' with pid 791
2016-01-12 08:03:05,830 INFO spawned: 'vaultier-worker' with pid 792
2016-01-12 08:03:05,927 INFO exited: vaultier-celerybeat (exit status 1; not expected)
2016-01-12 08:03:05,929 INFO exited: vaultier-worker (exit status 1; not expected)
2016-01-12 08:03:08,936 INFO spawned: 'vaultier-celerybeat' with pid 799
2016-01-12 08:03:08,940 INFO spawned: 'vaultier-worker' with pid 800
2016-01-12 08:03:09,037 INFO exited: vaultier-celerybeat (exit status 1; not expected)
2016-01-12 08:03:09,040 INFO gave up: vaultier-celerybeat entered FATAL state, too many start retries too quickly
2016-01-12 08:03:09,040 INFO exited: vaultier-worker (exit status 1; not expected)
2016-01-12 08:03:10,041 INFO gave up: vaultier-worker entered FATAL state, too many start retries too quickly

1 个答案:

答案 0 :(得分:1)

我遇到了这个问题。

http://docs.rclick.cz/docs/vaultier/en/latest/install.html处的安装说明显示了主管的配置,但它们不完整。

说明书还提到有一个名为venv / vaultier-config-examples / supervisord的设置文件。

venv / vaultier-config-examples / supervisord文件包含以下设置:

[program:vaultier-worker]
command=/opt/vaultier/venv/bin/celery -A vaultier worker
directory=/opt/vaultier
environment=PATH="/opt/vaultier/venv/bin",DJANGO_SETTINGS_MODULE="vaultier_conf",PYTHONPATH="/opt/vaultier/venv/lib/python2.7/site-packages/vaultier"
user=vaultier
numprocs=1
autostart=true
autorestart=true
startsecs=1
stopwaitsecs = 600

[program:vaultier-celerybeat]
command=/opt/vaultier/venv/bin/celery -A vaultier beat
directory=/opt/vaultier
environment=PATH="/opt/vaultier/venv/bin",DJANGO_SETTINGS_MODULE="vaultier_conf",PYTHONPATH="/opt/vaultier/venv/lib/python2.7/site-packages/vaultier"
user=vaultier
numprocs=1
autostart=true
autorestart=true
startsecs=1
stopwaitsecs = 600

[group:vaultier]
programs=vaultier-celerybeat,vaultier-worker

请注意,环境变量还包含PYTHONPATH,它与说明中显示的设置不同。

使用这些设置后,该过程已成功启动。