Hope everyone is doing well.
I'm trying to deploy a Django APP to elastic beanstalk however it is failing.
The error is Following services are not running: web
I'm not sure how to resolve it, I changed settings to be allowed_hosts = ['*']
but this still came up with the error.
I'm concerned it may be the database connection?
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '***',
'USER': '***',
'PASSWORD': '***',
'HOST': '***.***.ap-southeast-2.rds.amazonaws.com',
'PORT': '5432',
}
}
Any help will be much appreciated I've googled and googled and tried and tried but no solutions have worked for me (works fine with manage.py runserver).
The logs have not been much help to me as I don't understand them that well.
When I attempt to connect I get this in the nginx logs.
4335#4335: *88 connect() failed (111: Connection refused) while connecting to upstream
The daemon.log have these warnings:
WARN -- : log file "/var/log/nginx/healthd/application.log.2022-06-20-01" does not exist
The engine.log has these warnings:
[WARN] Warning: process healthd is already registered...
Deregistering the process ...
[WARN] stopProcess Warning: process xray is not registered
[WARN] deregisterProcess Warning: process httpd is not registered, skipping...
(Note: This is my first time using AWS EB)
Issue turned out to be with the django.config file.
originally I had web_project/wsgi.py.
I literally just updated per the django AWS tut and now it works, so much headache for such a simple thing.