Heroku上的Django应用程序:应用程序E

2024-05-29 11:53:58 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试在Heroku上启动Django web应用程序。

获取应用程序错误:应用程序中发生错误,无法为您的页面提供服务。请稍后再试。如果您是应用程序所有者,请查看日志以了解详细信息。

heroku日志:

2014-02-28T01:49:58.706311+00:00 heroku[run.6585]: Starting process with command `rake`
2014-02-28T01:50:01.064056+00:00 heroku[run.6585]: Process exited with status 1
2014-02-28T01:50:01.078817+00:00 heroku[run.6585]: State changed from up to complete
2014-02-28T01:47:36.064095+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=whispering-waters-3343.herokuapp.com request_id=8dd34dc2-41ee-40ef-b603-e731ba8a6078 fwd="173.164.141.93" dyno= connect= service= status=503 bytes=
2014-02-28T01:49:52.192771+00:00 heroku[api]: Starting process with command `rake` by amy.r.lam@gmail.com
2014-02-28T01:51:19.326151+00:00 heroku[run.7560]: Awaiting client
2014-02-28T01:51:19.358198+00:00 heroku[run.7560]: State changed from starting to up
2014-02-28T01:51:19.362731+00:00 heroku[run.7560]: Starting process with command `python manage.py syncdb`
2014-02-28T01:51:21.075401+00:00 heroku[run.7560]: State changed from up to complete
2014-02-28T01:51:21.062102+00:00 heroku[run.7560]: Process exited with status 2
2014-02-28T01:51:30.442655+00:00 heroku[api]: Starting process with command `python mysite/manage.py syncdb` by amy.r.lam@gmail.com
2014-02-28T01:51:36.973260+00:00 heroku[run.9486]: Awaiting client
2014-02-28T01:51:37.100935+00:00 heroku[run.9486]: Starting process with command `python mysite/manage.py syncdb`
2014-02-28T01:52:01.887843+00:00 heroku[run.9486]: Process exited with status 0
2014-02-28T01:49:46.430021+00:00 heroku[run.4760]: State changed from up to complete
2014-02-28T01:52:11.589525+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=whispering-waters-3343.herokuapp.com request_id=8cd012cf-37cd-424e-8e69-c8463d488d95 fwd="173.164.141.93" dyno= connect= service= status=503 bytes=
2014-02-28T01:52:12.020302+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=whispering-waters-3343.herokuapp.com request_id=fe3d19e2-af38-46b6-a9f2-2f3e76bd4bff fwd="173.164.141.93" dyno= connect= service= status=503 bytes=
2014-02-28T01:52:01.902293+00:00 heroku[run.9486]: State changed from up to complete
2014-02-28T01:55:19.056405+00:00 heroku[web.1]: Starting process with command `gunicorn hellodjango.wsgi`
2014-02-28T01:55:20.491536+00:00 app[web.1]: 2014-02-28 01:55:20 [2] [INFO] Listening at: http://0.0.0.0:45860 (2)
2014-02-28T01:55:20.490915+00:00 app[web.1]: 2014-02-28 01:55:20 [2] [INFO] Starting gunicorn 18.0
2014-02-28T01:55:20.502381+00:00 app[web.1]: 2014-02-28 01:55:20 [2] [INFO] Using worker: sync
2014-02-28T01:55:20.520439+00:00 app[web.1]: 2014-02-28 01:55:20 [7] [INFO] Booting worker with pid: 7
2014-02-28T01:55:20.532572+00:00 app[web.1]: 2014-02-28 01:55:20 [7] [ERROR] Exception in worker process:
2014-02-28T01:55:20.532572+00:00 app[web.1]: Traceback (most recent call last):
2014-02-28T01:55:20.532572+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2014-02-28T01:55:20.532572+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
2014-02-28T01:55:20.532812+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2014-02-28T01:55:20.532812+00:00 app[web.1]:     return util.import_app(self.app_uri)
2014-02-28T01:55:20.532812+00:00 app[web.1]:     __import__(module)
2014-02-28T01:55:20.532572+00:00 app[web.1]:     worker.init_process()
2014-02-28T01:55:20.532572+00:00 app[web.1]:     self.callable = self.load()
2014-02-28T01:55:20.532572+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process
2014-02-28T01:55:20.532572+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
2014-02-28T01:55:20.532812+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2014-02-28T01:55:20.532812+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process
2014-02-28T01:55:20.532812+00:00 app[web.1]: Traceback (most recent call last):
2014-02-28T01:55:20.533000+00:00 app[web.1]:     self.callable = self.load()
2014-02-28T01:55:20.532572+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi
2014-02-28T01:55:20.532572+00:00 app[web.1]:     return self.load_wsgiapp()
2014-02-28T01:55:20.532812+00:00 app[web.1]: ImportError: No module named hellodjango.wsgi
2014-02-28T01:55:20.532812+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
2014-02-28T01:55:20.532812+00:00 app[web.1]:     worker.init_process()
2014-02-28T01:55:20.533000+00:00 app[web.1]:     __import__(module)
2014-02-28T01:55:20.533000+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
2014-02-28T01:55:20.533000+00:00 app[web.1]: 2014-02-28 01:55:20 [7] [INFO] Worker exiting (pid: 7)
2014-02-28T01:55:20.533000+00:00 app[web.1]:     return self.load_wsgiapp()
2014-02-28T01:55:20.533000+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2014-02-28T01:55:20.533000+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi
2014-02-28T01:55:20.533000+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
2014-02-28T01:55:20.532812+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
2014-02-28T01:55:20.533000+00:00 app[web.1]: ImportError: No module named hellodjango.wsgi
2014-02-28T01:55:20.533000+00:00 app[web.1]:     return util.import_app(self.app_uri)
2014-02-28T01:55:20.689228+00:00 app[web.1]: 2014-02-28 01:55:20 [2] [INFO] Shutting down: Master
2014-02-28T01:55:20.689360+00:00 app[web.1]: 2014-02-28 01:55:20 [2] [INFO] Reason: Worker failed to boot.
2014-02-28T01:55:21.970445+00:00 heroku[web.1]: Process exited with status 3
2014-02-28T01:55:27.158974+00:00 heroku[web.1]: Starting process with command `gunicorn hellodjango.wsgi`
2014-02-28T01:55:28.155161+00:00 app[web.1]: 2014-02-28 01:55:28 [2] [INFO] Starting gunicorn 18.0
2014-02-28T01:55:28.156682+00:00 app[web.1]: 2014-02-28 01:55:28 [2] [INFO] Listening at: http://0.0.0.0:8671 (2)
2014-02-28T01:55:28.156682+00:00 app[web.1]: 2014-02-28 01:55:28 [2] [INFO] Using worker: sync
2014-02-28T01:55:28.166192+00:00 app[web.1]: 2014-02-28 01:55:28 [7] [INFO] Booting worker with pid: 7
2014-02-28T01:55:28.171442+00:00 app[web.1]: 2014-02-28 01:55:28 [7] [ERROR] Exception in worker process:
2014-02-28T01:55:28.171442+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi
2014-02-28T01:55:28.171442+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
2014-02-28T01:55:28.171442+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
2014-02-28T01:55:28.171442+00:00 app[web.1]: Traceback (most recent call last):
2014-02-28T01:55:28.171442+00:00 app[web.1]:     worker.init_process()
2014-02-28T01:55:28.171442+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process
2014-02-28T01:55:28.171442+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2014-02-28T01:55:28.171442+00:00 app[web.1]:     return self.load_wsgiapp()
2014-02-28T01:55:28.171688+00:00 app[web.1]: Traceback (most recent call last):
2014-02-28T01:55:28.171688+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2014-02-28T01:55:28.171688+00:00 app[web.1]:     return util.import_app(self.app_uri)
2014-02-28T01:55:28.171442+00:00 app[web.1]:     self.callable = self.load()
2014-02-28T01:55:28.171688+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
2014-02-28T01:55:28.171688+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process
2014-02-28T01:55:28.171876+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2014-02-28T01:55:28.171688+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2014-02-28T01:55:28.171688+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
2014-02-28T01:55:28.171876+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi
2014-02-28T01:55:28.171876+00:00 app[web.1]:     self.callable = self.load()
2014-02-28T01:55:28.171688+00:00 app[web.1]:     __import__(module)
2014-02-28T01:55:28.171876+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
2014-02-28T01:55:28.171688+00:00 app[web.1]:     worker.init_process()
2014-02-28T01:55:28.171876+00:00 app[web.1]:     __import__(module)
2014-02-28T01:55:28.171876+00:00 app[web.1]: ImportError: No module named hellodjango.wsgi
2014-02-28T01:55:28.171876+00:00 app[web.1]: 2014-02-28 01:55:28 [7] [INFO] Worker exiting (pid: 7)
2014-02-28T01:55:28.171876+00:00 app[web.1]:     return self.load_wsgiapp()
2014-02-28T01:55:28.171876+00:00 app[web.1]:     return util.import_app(self.app_uri)
2014-02-28T01:55:28.171688+00:00 app[web.1]: ImportError: No module named hellodjango.wsgi
2014-02-28T01:55:28.171876+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
2014-02-28T01:55:28.302686+00:00 app[web.1]: 2014-02-28 01:55:28 [2] [INFO] Reason: Worker failed to boot.
2014-02-28T01:55:28.301829+00:00 app[web.1]: 2014-02-28 01:55:28 [2] [INFO] Shutting down: Master
2014-02-28T01:55:29.730749+00:00 heroku[web.1]: Process exited with status 3
2014-02-28T01:56:03.044535+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=whispering-waters-3343.herokuapp.com request_id=1f164238-99f1-4ba8-8761-7269025f0322 fwd="173.164.141.93" dyno= connect= service= status=503 bytes=
2014-02-28T01:55:14.121881+00:00 heroku[web.1]: State changed from crashed to starting
2014-02-28T01:55:21.980705+00:00 heroku[web.1]: State changed from starting to crashed
2014-02-28T01:55:21.981905+00:00 heroku[web.1]: State changed from crashed to starting
2014-02-28T01:55:29.742422+00:00 heroku[web.1]: State changed from starting to crashed
2014-02-28T01:59:40.421794+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=whispering-waters-3343.herokuapp.com request_id=349cce4c-69af-42ee-a19d-5c35d6713390 fwd="173.164.141.93" dyno= connect= service= status=503 bytes=
2014-02-28T01:59:40.682076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=whispering-waters-3343.herokuapp.com request_id=f998d494-1026-45b3-9c44-2cfb19f45b14 fwd="173.164.141.93" dyno= connect= service= status=503 bytes=

Tags: inpyselfappwsgiherokulibpackages
2条回答

问题似乎是这样的:“importorror:没有名为hellodjango.wsgi的模块”

从您发布的信息来看,听起来“hellodjango”不是项目和WSGI应用程序的名称,因此对hellodjango.WSGI的引用失败。

我猜你的项目结构和wsgi.py文件中的名字应该是“mysite”。

编辑:procfile应该调用.wsgi(这是默认的django行为)。

请在评论中详细说明您用于启动此项目的项目名称。

更新procfile,用应用程序的正确名称替换mysite.wsgi,它将运行。

你可能是通过一个教程来到这里的,改变这些信息并不明显。

相关问题 更多 >

    热门问题