I follow all the instructions on the official AWS website, but I still get the same error. I have tried several projects, each on the local server works quite normally as soon as it starts on AWS I get the next error 502 Bad Gateway.
- this seams like main problem :
ModuleNotFoundError: No module named 'ebddjango/wsgi'
wsg file:
import os from django.core.wsgi
import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ebddjango.settings') application = get_wsgi_application()
config:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: ebddjango/wsgi:application
Status:
Updated: 2022-01-27 14:19:09.259000+00:00
Status: Ready
Health: Red
Erorr log
Jan 27 14:49:19 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Jan 27 14:49:19 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Jan 27 14:49:19 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
Jan 27 14:49:19 ip-172-31-8-170 web: ModuleNotFoundError: No module named 'ebddjango/wsgi'
Jan 27 14:49:19 ip-172-31-8-170 web: [2022-01-27 14:49:19 +0000] [4399] [INFO] Worker exiting (pid: 4399)
Jan 27 14:49:19 ip-172-31-8-170 web: [2022-01-27 14:49:19 +0000] [4392] [INFO] Shutting down: Master
Jan 27 14:49:19 ip-172-31-8-170 web: [2022-01-27 14:49:19 +0000] [4392] [INFO] Reason: Worker failed to boot.
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4407] [INFO] Starting gunicorn 20.1.0
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4407] [INFO] Listening at: http://127.0.0.1:8000 (4407)
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4407] [INFO] Using worker: gthread
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4414] [INFO] Booting worker with pid: 4414
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4414] [ERROR] Exception in worker process
Jan 27 14:49:20 ip-172-31-8-170 web: Traceback (most recent call last):
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
Jan 27 14:49:20 ip-172-31-8-170 web: worker.init_process()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
Jan 27 14:49:20 ip-172-31-8-170 web: super().init_process()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
Jan 27 14:49:20 ip-172-31-8-170 web: self.load_wsgi()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
Jan 27 14:49:20 ip-172-31-8-170 web: self.wsgi = self.app.wsgi()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
Jan 27 14:49:20 ip-172-31-8-170 web: self.callable = self.load()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Jan 27 14:49:20 ip-172-31-8-170 web: return self.load_wsgiapp()
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Jan 27 14:49:20 ip-172-31-8-170 web: return util.import_app(self.app_uri)
Jan 27 14:49:20 ip-172-31-8-170 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
Jan 27 14:49:20 ip-172-31-8-170 web: mod = importlib.import_module(module)
Jan 27 14:49:20 ip-172-31-8-170 web: File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
Jan 27 14:49:20 ip-172-31-8-170 web: return _bootstrap._gcd_import(name[level:], package, level)
Jan 27 14:49:20 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Jan 27 14:49:20 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Jan 27 14:49:20 ip-172-31-8-170 web: File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
Jan 27 14:49:20 ip-172-31-8-170 web: ModuleNotFoundError: No module named 'ebddjango/wsgi'
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4414] [INFO] Worker exiting (pid: 4414)
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4407] [INFO] Shutting down: Master
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4407] [INFO] Reason: Worker failed to boot.
Jan 27 14:49:20 ip-172-31-8-170 web: [2022-01-27 14:49:20 +0000] [4422] [INFO] Starting gunicorn 20.1.0
-- More --