用gunicorn运行django

之前在服务器上装了django,用nginx和gunicorn跑起来了。后来有做了个virtualenv,然后又装了一个django,用gunicorn,出错。
怎么回事?请教

gunicorn wsgi.py --bind localhost:8003
[2017-01-01 22:35:34 +0000] [15875] [INFO] Starting gunicorn 19.6.0
[2017-01-01 22:35:34 +0000] [15875] [INFO] Listening at: http://127.0.0.1:8003 (15875)
[2017-01-01 22:35:34 +0000] [15875] [INFO] Using worker: sync
[2017-01-01 22:35:34 +0000] [15880] [INFO] Booting worker with pid: 15880
[2017-01-01 22:35:34 +0000] [15880] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
    __import__(module)
ImportError: No module named wsgi.py
[2017-01-01 22:35:34 +0000] [15880] [INFO] Worker exiting (pid: 15880)
[2017-01-01 22:35:34 +0000] [15875] [INFO] Shutting down: Master
[2017-01-01 22:35:34 +0000] [15875] [INFO] Reason: Worker failed to boot.
回复
阅读 4.6k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏