This is a template you must use to report issues.
You can also drag images, videos and includePreformatted text
.
Feature(s) impacted
Please describe in this mandatory section the feature(s) that will be discussed in this topic.
The setup of a new ForestAdmin project with Django and Gunicorn
Observed behavior
Please describe in this mandatory section the current behavior you observe.
When following the steps to add a new Django datasource we experience errors on call of init_forest
in wsgi.py
when starting the webserver. Calling python manage.py runserver
does run without these errors, but on the ForestAdmin front end it says “Your admin backend is unreachable Please check that it is running and respond to https://…”
Expected behavior
Please describe in this mandatory section the behavior you are expecting.
Being able to start the gunicorn webserver and connecting it to ForestAdmin
Failure Logs
In this optional section, please:
- include any relevant log snippets if necessary,
- or remove this section if left empty.
The stack trace when starting the server with systemctl:
GNU nano 2.9.8 /var/log/gunicorn.log
self.load_wsgi()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib64/python3.8/importlib/_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/www/root/webapp/source/app/wsgi.py", line 8, in <module>
init_forest()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/django_forest/_init_.py", line 11, in init_forest
Schema.build_schema()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/django_forest/utils/schema/_init_.py", line 117, in b$
for model in Models.list():
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/django_forest/utils/models.py", line 14, in list
cls.models = apps.get_models(include_auto_created=True)
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/django/apps/registry.py", line 179, in get_models
self.check_models_ready()
File "/var/www/root/webapp/venv/lib/python3.8/site-packages/django/apps/registry.py", line 141, in check_models_rea$
raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
[2022-03-11 17:09:47 +0000] [111229] [INFO] Worker exiting (pid: 111229)
[2022-03-11 18:09:47 +0100] [111226] [INFO] Shutting down: Master
[2022-03-11 18:09:47 +0100] [111226] [INFO] Reason: Worker failed to boot.
Context
Please provide in this mandatory section, the relevant information about your configuration:
- Project name: Webapp Staging
- Team name: Scoobe3D
- Environment name: Staging
- Agent type & version: -
- Recent changes made on your end if any: -