2
我設法讓我的Ubuntu服務器上安裝vaultier。爲了完成安裝,我必須添加vaultier作爲守護進程,以便與supervisord在後臺工作。supervisord沒有這樣的進程vaultier
這裏是香港專業教育學院迄今所做的:
/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
您可以嘗試將'/ opt/vaultier/venv/bin:'更改爲'/ opt/vaultier/venv/bin'。注意冒號。 – sushant
與以前相同的錯誤:/ –
您能否確認您在virtualenv中安裝了'vaultier'? – sushant