mercredi 4 mars 2015

500 Internal Server Error in AWS Elastic BeanStalk Flask appliation

I was deploying my Flask application to AWS Elastic Beanstalk. And I'm getting 500 Internal Server Error! This is the httpd error log



[:error] [pid 6685] * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[Wed Mar 04 16:21:27.025344 2015] [:warn] [pid 6685] mod_wsgi (pid=6685): Callback registration for signal 15 ignored.
[Wed Mar 04 16:21:27.026720 2015] [:warn] [pid 6685] File "/opt/python/current/app/run.py", line 3, in <module>
[Wed Mar 04 16:21:27.026744 2015] [:warn] [pid 6685] app.run(debug=True)
[Wed Mar 04 16:21:27.026761 2015] [:warn] [pid 6685] File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 772, in run
[Wed Mar 04 16:21:27.026776 2015] [:warn] [pid 6685] run_simple(host, port, self, **options)
[Wed Mar 04 16:21:27.026791 2015] [:warn] [pid 6685] File "/opt/python/run/venv/lib/python2.7/site-packages/werkzeug/serving.py", line 622, in run_simple
[Wed Mar 04 16:21:27.026805 2015] [:warn] [pid 6685] reloader_type)
[Wed Mar 04 16:21:27.026821 2015] [:warn] [pid 6685] File "/opt/python/run/venv/lib/python2.7/site-packages/werkzeug/_reloader.py", line 263, in run_with_reloader
[Wed Mar 04 16:21:27.026835 2015] [:warn] [pid 6685] signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
[Wed Mar 04 16:21:27.026940 2015] [:error] [pid 6685] * Restarting with stat
/opt/python/run/venv/bin/python: : [Errno 2] No such file or directory
[Wed Mar 04 16:21:27.058688 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] mod_wsgi (pid=6685): Target WSGI script '/opt/python/current/app/run.py' cannot be loaded as Python module.0] File "/opt/python/current/app/run.py", line 3, in <module>
[Wed Mar 04 16:21:27.059049 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] app.run(debug=True)
[Wed Mar 04 16:21:27.059098 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] File "/opt/python/run/venv/lib/python2.7/site-packages/flask/app.py", line 772, in run
[Wed Mar 04 16:21:27.059165 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] run_simple(host, port, self, **options)
[Wed Mar 04 16:21:27.059205 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] File "/opt/python/run/venv/lib/python2.7/site-packages/werkzeug/serving.py", line 622, in run_simple
[Wed Mar 04 16:21:27.059252 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] reloader_type)
[Wed Mar 04 16:21:27.059286 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] File "/opt/python/run/venv/lib/python2.7/site-packages/werkzeug/_reloader.py", line 271, in run_with_reloader
[Wed Mar 04 16:21:27.059328 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] sys.exit(reloader.restart_with_reloader())
[Wed Mar 04 16:21:27.059389 2015] [:error] [pid 6685] [remote 127.0.0.1:30490] SystemExit: 2


This is the requirements.txt file:



Babel==1.3
blinker==1.3
coverage==3.7.1
decorator==3.4.0
Flask==0.10.1
Flask-Babel==0.9
Flask-Login==0.2.11
Flask-Mail==0.9.1
Flask-OpenID==1.2.4
Flask-SQLAlchemy==2.0
Flask-WhooshAlchemy==0.56
Flask-WTF==0.11
flipflop==1.0
guess-language==0.2
itsdangerous==0.24
Jinja2==2.7.3
MarkupSafe==0.23
mod-wsgi==4.4.9
pbr==0.10.8
python-openid==2.2.5
pytz==2014.10
six==1.9.0
speaklater==1.3
SQLAlchemy==0.9.8
sqlalchemy-migrate==0.9.5
sqlparse==0.1.14
Tempita==0.5.2
Werkzeug==0.10.1
Whoosh==2.6.0
WTForms==2.0.2


Please help me resolve this problem. Thanks!





Aucun commentaire:

Enregistrer un commentaire