Amal Ts
Amal Ts

Reputation: 861

gunicorn worker fails to boot

Tried running my django app on gunicorn, but failed to start with below errors.

Command : gunicorn core.wsgi.py -b 0.0.0.0:8080

2016-03-14 06:55:16 +0000] [9726] [INFO] Booting worker with pid: 9726
[2016-03-14 06:55:16 +0000] [9726] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/arbiter.py", line 515, in spawn_worker
    worker.init_process()
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/workers/base.py", line 122, in init_process
    self.load_wsgi()
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/workers/base.py", line 130, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/var/www/uatenv/lib/python2.7/site-packages/gunicorn-19.4.5-py2.7.egg/gunicorn/util.py", line 357, in import_app
    __import__(module)
ImportError: No module named py

Upvotes: 1

Views: 2409

Answers (1)

Amal Ts
Amal Ts

Reputation: 861

Fixed it.

gunicorn core.wsgi.py -b 0.0.0.0:8080

was throwing as i added given the filename instead of module. Corrected with

gunicorn core.wsgi -b 0.0.0.0:8080

Upvotes: 2

Related Questions