如何解决Django-在Elastic-Beanstalk上启动后出现500错误
您好,我对整个Web部署还是很满意的,所以请允许我,这只是我的第二次部署。我遇到了一个名为“ 500 Internal Server Error”的问题,我查看了aws文档,发现它只能给我带来错误,但未知。代码全部在我使用runserver启动之前运行,并且服务器在放入代码之前已在运行,所以我不知道问题可能在哪里。我使用eb日志获取以下数据:
============= i-030b809a2708731e5 ==============
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Tue Oct 06 19:47:09.942986 2020] [:error] [pid 4761] [remote 172.31.36.89:152] apps.populate(settings.INSTALLED_APPS)
[Tue Oct 06 19:47:09.942991 2020] [:error] [pid 4761] [remote 172.31.36.89:152] File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/apps/registry.py",line 81,in populate
[Tue Oct 06 19:47:09.942994 2020] [:error] [pid 4761] [remote 172.31.36.89:152] raise RuntimeError("populate() isn't reentrant")
[Tue Oct 06 19:47:09.943009 2020] [:error] [pid 4761] [remote 172.31.36.89:152] RuntimeError: populate() isn't reentrant[Tue Oct 06 19:47:22.721931 2020] [:error] [pid 4761] [remote 172.31.36.89:152] mod_wsgi (pid=4761): Target WSGI script '/opt/python/current/app/SpaceNerdsLaunch/wsgi.py' cannot be loaded as Python module.
[Tue Oct 06 19:47:22.721979 2020] [:error] [pid 4761] [remote 172.31.36.89:152] mod_wsgi (pid=4761): Exception occurred processing WSGI script '/opt/python/current/app/SpaceNerdsLaunch/wsgi.py'.
[Tue Oct 06 19:47:22.722087 2020] [:error] [pid 4761] [remote 172.31.36.89:152] Traceback (most recent call last):
[Tue Oct 06 19:47:22.722119 2020] [:error] [pid 4761] [remote 172.31.36.89:152] File "/opt/python/current/app/SpaceNerdsLaunch/wsgi.py",line 16,in <module>
[Tue Oct 06 19:47:22.722133 2020] [:error] [pid 4761] [remote 172.31.36.89:152] application = get_wsgi_application()[Tue Oct 06 19:47:22.722140 2020] [:error] [pid 4761] [remote 172.31.36.89:152] File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py",line 12,in get_wsgi_application
[Tue Oct 06 19:47:22.722144 2020] [:error] [pid 4761] [remote 172.31.36.89:152] django.setup(set_prefix=False)
[Tue Oct 06 19:47:22.722149 2020] [:error] [pid 4761] [remote 172.31.36.89:152] File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py",line 24,in setup
[Tue Oct 06 19:47:22.722152 2020] [:error] [pid 4761] [remote 172.31.36.89:152] apps.populate(settings.INSTALLED_APPS)
[Tue Oct 06 19:47:22.722158 2020] [:error] [pid 4761] [remote 172.31.36.89:152] File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/apps/registry.py",in populate
[Tue Oct 06 19:47:22.722161 2020] [:error] [pid 4761] [remote 172.31.36.89:152] raise RuntimeError("populate() isn't-- More --
即使有人能指出我正确的工作方向,我也将非常感激。我对这一切都很陌生,我什至不知道该去哪里阅读和学习足够的知识来解决此问题,而aws文档确实并没有任何帮助。预先谢谢你。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。