Virtual host for Django project not working

Keywords: Django - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: 63676777-dd32-0e33-d918-092940fa3177

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
Hi! I’m running a Django app on AWS Lightsail but I got ‘500 Internal Server Error’ when I was trying to ‘Enable predefined virtual hosts for a Django project’(https://docs.bitnami.com/aws/infrastructure/django/get-started/deploy-django-project/)

Some steps I checked:

  1. My project can be browsed on Server-IP:8000
  2. I have already edited the firewall/networking part on Lightsail
  3. Status: apache already running
  4. I replaced the ‘sample’ in the .conf with my project name
  5. tried both enable/disable the original ‘00_status-vhost.conf’

Please help! Thanks in advance!

Hi @cupm2021,

The Bitnami Diagnostic Tool warned you about an error in the Apache’s log

[Mon Nov 01 19:38:40.501548 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449] mod_wsgi (pid=26334): Exception occurred processing WSGI script '/opt/bitnami/projects/prediction_market/        prediction_market/wsgi.py'.
[Mon Nov 01 19:38:40.501662 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449] Traceback (most recent call last):
[Mon Nov 01 19:38:40.501709 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]   File "/opt/bitnami/projects/prediction_market/prediction_market/wsgi.py", line 13, in <module>
[Mon Nov 01 19:38:40.501717 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]     application = get_wsgi_application()
[Mon Nov 01 19:38:40.501727 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]   File "/opt/bitnami/python/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Mon Nov 01 19:38:40.501732 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]     django.setup(set_prefix=False)
[Mon Nov 01 19:38:40.501741 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]   File "/opt/bitnami/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
[Mon Nov 01 19:38:40.501746 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]     apps.populate(settings.INSTALLED_APPS)
[Mon Nov 01 19:38:40.501754 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]   File "/opt/bitnami/python/lib/python3.8/site-packages/django/apps/registry.py", line 83, in populate
[Mon Nov 01 19:38:40.501760 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449]     raise RuntimeError("populate() isn't reentrant")
[Mon Nov 01 19:38:40.501777 2021] [wsgi:error] [pid 26334:tid 140172208490240] [remote 71.183.244.116:64449] RuntimeError: populate() isn't reentrant

This Stack Overflow post may help

https://stackoverflow.com/questions/27093746/django-stops-working-with-runtimeerror-populate-isnt-reentrant

Happy to help!


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.