Hi,
Did some cleanup on my mongodb and afterwards noted that after a restart my mhn-celery-worker is failing to start with the following error:
root@host:/etc/supervisor/conf.d# /opt/mhn/env/bin/celery worker -A mhn.tasks --loglevel=DEBUG
Traceback (most recent call last):
File "/opt/mhn/env/bin/celery", line 11, in <module>
sys.exit(main())
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/__main__.py", line 30, in main
main()
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/celery.py", line 81, in main
cmd.execute_from_commandline(argv)
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/celery.py", line 769, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/base.py", line 305, in execute_from_commandline
argv = self.setup_app_from_commandline(argv)
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/base.py", line 465, in setup_app_from_commandline
self.app = self.find_app(app)
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/base.py", line 485, in find_app
return find_app(app, symbol_by_name=self.symbol_by_name)
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/app/utils.py", line 229, in find_app
sym = symbol_by_name(app, imp=imp)
File "/opt/mhn/env/local/lib/python2.7/site-packages/celery/bin/base.py", line 488, in symbol_by_name
return symbol_by_name(name, imp=imp)
File "/opt/mhn/env/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 92, in symbol_by_name
module = imp(module_name, package=package, **kwargs)
File "/opt/mhn/env/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 mhn
It appears that it cannot find the python module mhn. Sure enough when I launch python and try to import mhn, I get the following:
root@host:/etc/supervisor/conf.d# python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mhn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mhn
>>>
This system has been up and running for months just fine - I never saw this issue before. Is there a quick fix? Upgrade?
thanks,
—Scott