Error: Target WSGI script “my_app”/wsgi.py' cannot be loaded as Python module (Windows Instance)

228 views
Skip to first unread message

Daanish Faiz

unread,
Aug 16, 2020, 12:10:40 AM8/16/20
to modwsgi
Hi 

I am trying to deploy a django app on aws eb and am getting an error that I have been trying to get passed for a few days.


My server httpd error_log file:
[Sat Aug 15 05:54:03.377524 2020] [suexec:notice] [pid 3086] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 15 05:54:03.392927 2020] [http2:warn] [pid 3086] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sat Aug 15 05:54:03.392941 2020] [http2:warn] [pid 3086] AH02951: mod_ssl does not seem to be enabled
[Sat Aug 15 05:54:03.393376 2020] [lbmethod_heartbeat:notice] [pid 3086] AH02282: No slotmem from mod_heartmonitor
[Sat Aug 15 05:54:03.393447 2020] [:warn] [pid 3086] mod_wsgi: Compiled for Python/3.6.2.
[Sat Aug 15 05:54:03.393453 2020] [:warn] [pid 3086] mod_wsgi: Runtime using Python/3.6.11.
[Sat Aug 15 05:54:03.395279 2020] [mpm_prefork:notice] [pid 3086] AH00163: Apache/2.4.43 (Amazon) mod_wsgi/3.5 Python/3.6.11 configured -- resuming normal operations
[Sat Aug 15 05:54:03.395293 2020] [core:notice] [pid 3086] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sat Aug 15 05:55:10.368312 2020] [mpm_prefork:notice] [pid 3086] AH00169: caught SIGTERM, shutting down
[Sat Aug 15 05:55:11.424908 2020] [suexec:notice] [pid 3406] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Aug 15 05:55:11.440322 2020] [so:warn] [pid 3406] AH01574: module wsgi_module is already loaded, skipping
[Sat Aug 15 05:55:11.442493 2020] [http2:warn] [pid 3406] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sat Aug 15 05:55:11.442504 2020] [http2:warn] [pid 3406] AH02951: mod_ssl does not seem to be enabled
[Sat Aug 15 05:55:11.443031 2020] [lbmethod_heartbeat:notice] [pid 3406] AH02282: No slotmem from mod_heartmonitor
[Sat Aug 15 05:55:11.443090 2020] [:warn] [pid 3406] mod_wsgi: Compiled for Python/3.6.2.
[Sat Aug 15 05:55:11.443094 2020] [:warn] [pid 3406] mod_wsgi: Runtime using Python/3.6.11.
[Sat Aug 15 05:55:11.445338 2020] [mpm_prefork:notice] [pid 3406] AH00163: Apache/2.4.43 (Amazon) mod_wsgi/3.5 Python/3.6.11 configured -- resuming normal operations
[Sat Aug 15 05:55:11.445354 2020] [core:notice] [pid 3406] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sat Aug 15 05:55:14.437391 2020] [:error] [pid 3411] [remote 127.0.0.1:0] mod_wsgi (pid=3411): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sat Aug 15 05:55:14.437468 2020] [:error] [pid 3411] [remote 127.0.0.1:0] mod_wsgi (pid=3411): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sat Aug 15 05:55:14.437913 2020] [:error] [pid 3411] [remote 127.0.0.1:0] Traceback (most recent call last):
[Sat Aug 15 05:55:14.437954 2020] [:error] [pid 3411] [remote 127.0.0.1:0]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sat Aug 15 05:55:14.437959 2020] [:error] [pid 3411] [remote 127.0.0.1:0]     application = get_wsgi_application()
[Sat Aug 15 05:55:14.437966 2020] [:error] [pid 3411] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sat Aug 15 05:55:14.437970 2020] [:error] [pid 3411] [remote 127.0.0.1:0]     django.setup(set_prefix=False)
[Sat Aug 15 05:55:14.437976 2020] [:error] [pid 3411] [remote 127.0.0.1:0]   File

My wsgi.py file
import os

from django.core.wsgi import get_wsgi_application

os
.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cliquefit.settings')

application
= get_wsgi_application()

My .ebextensions/django.config file:
option_settings:
  aws
:elasticbeanstalk:container:python:
   
WSGIPath: "cliquefit/wsgi.py"

packages
:
    yum
:
        httpd24
-devel: []

What I have tried:

  • verifying my python 3.6 build and mod_wsgi version.

  • checking httpd.config in my apache2.4 setup and troubleshooting. I also tried rerunning through the flow of setting up apache2.4

Sorry if this is rudimental question - i've been working incredibly hard on this. Thank you for all your help in advance!


Graham Dumpleton

unread,
Aug 16, 2020, 12:12:56 AM8/16/20
to mod...@googlegroups.com
You cut off the end of the Python exception traceback and the description of the exception, so I cannot suggest anything. If can post the full traceback and exception type and description that may help.

--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/9fd06c1e-3bc3-4233-8650-dec05ee02365o%40googlegroups.com.

Daanish Faiz

unread,
Aug 16, 2020, 12:58:59 AM8/16/20
to modwsgi
Sorry my mistake, thanks for the quick response Graham:

I have rerun it and attached the complete log below:

[Sun Aug 16 02:24:44.825634 2020] [mpm_prefork:notice] [pid 3136] AH00169: caught SIGTERM, shutting down
[Sun Aug 16 02:24:45.953409 2020] [suexec:notice] [pid 5607] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Aug 16 02:24:45.968830 2020] [so:warn] [pid 5607] AH01574: module wsgi_module is already loaded, skipping
[Sun Aug 16 02:24:45.972004 2020] [http2:warn] [pid 5607] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Aug 16 02:24:45.972015 2020] [http2:warn] [pid 5607] AH02951: mod_ssl does not seem to be enabled
[Sun Aug 16 02:24:45.972542 2020] [lbmethod_heartbeat:notice] [pid 5607] AH02282: No slotmem from mod_heartmonitor
[Sun Aug 16 02:24:45.972607 2020] [:warn] [pid 5607] mod_wsgi: Compiled for Python/3.6.2.
[Sun Aug 16 02:24:45.972616 2020] [:warn] [pid 5607] mod_wsgi: Runtime using Python/3.6.11.
[Sun Aug 16 02:24:45.974802 2020] [mpm_prefork:notice] [pid 5607] AH00163: Apache/2.4.43 (Amazon) mod_wsgi/3.5 Python/3.6.11 configured -- resuming normal operations
[Sun Aug 16 02:24:45.974820 2020] [core:notice] [pid 5607] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Aug 16 02:24:48.983705 2020] [:error] [pid 5612] [remote 127.0.0.1:0] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:24:48.983755 2020] [:error] [pid 5612] [remote 127.0.0.1:0] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:24:48.984202 2020] [:error] [pid 5612] [remote 127.0.0.1:0] Traceback (most recent call last):
[Sun Aug 16 02:24:48.984243 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:24:48.984248 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     application = get_wsgi_application()
[Sun Aug 16 02:24:48.984255 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:24:48.984258 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     django.setup(set_prefix=False)
[Sun Aug 16 02:24:48.984264 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:24:48.984267 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:24:48.984273 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:24:48.984276 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     self._setup(name)
[Sun Aug 16 02:24:48.984281 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:24:48.984285 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:24:48.984290 2020] [:error] [pid 5612] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:24:48.984293 2020] [:error] [pid 5612] [remote 127.0.0.1:0]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:24:48.984309 2020] [:error] [pid 5612] [remote 127.0.0.1:0] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:24:49.987501 2020] [:error] [pid 5612] [remote 127.0.0.1:36] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:24:49.987553 2020] [:error] [pid 5612] [remote 127.0.0.1:36] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:24:49.987695 2020] [:error] [pid 5612] [remote 127.0.0.1:36] Traceback (most recent call last):
[Sun Aug 16 02:24:49.987740 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:24:49.987745 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     application = get_wsgi_application()
[Sun Aug 16 02:24:49.987751 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:24:49.987754 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     django.setup(set_prefix=False)
[Sun Aug 16 02:24:49.987760 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:24:49.987763 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:24:49.987769 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:24:49.987772 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     self._setup(name)
[Sun Aug 16 02:24:49.987777 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:24:49.987780 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:24:49.987785 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:24:49.987788 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:24:49.987816 2020] [:error] [pid 5612] [remote 127.0.0.1:36] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:24:50.991236 2020] [:error] [pid 5612] [remote 127.0.0.1:36] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:24:50.991282 2020] [:error] [pid 5612] [remote 127.0.0.1:36] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:24:50.991401 2020] [:error] [pid 5612] [remote 127.0.0.1:36] Traceback (most recent call last):
[Sun Aug 16 02:24:50.991443 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:24:50.991448 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     application = get_wsgi_application()
[Sun Aug 16 02:24:50.991523 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:24:50.991530 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     django.setup(set_prefix=False)
[Sun Aug 16 02:24:50.991536 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:24:50.991540 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:24:50.991546 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:24:50.991549 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     self._setup(name)
[Sun Aug 16 02:24:50.991554 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:24:50.991558 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:24:50.991573 2020] [:error] [pid 5612] [remote 127.0.0.1:36]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:24:50.991576 2020] [:error] [pid 5612] [remote 127.0.0.1:36]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:24:50.991594 2020] [:error] [pid 5612] [remote 127.0.0.1:36] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:24:51.994343 2020] [:error] [pid 5612] [remote 127.0.0.1:40] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:24:51.994390 2020] [:error] [pid 5612] [remote 127.0.0.1:40] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:24:51.994509 2020] [:error] [pid 5612] [remote 127.0.0.1:40] Traceback (most recent call last):
[Sun Aug 16 02:24:51.994552 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:24:51.994556 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     application = get_wsgi_application()
[Sun Aug 16 02:24:51.994563 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:24:51.994567 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     django.setup(set_prefix=False)
[Sun Aug 16 02:24:51.994572 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:24:51.994576 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:24:51.994581 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:24:51.994585 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     self._setup(name)
[Sun Aug 16 02:24:51.994590 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:24:51.994593 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:24:51.994598 2020] [:error] [pid 5612] [remote 127.0.0.1:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:24:51.994601 2020] [:error] [pid 5612] [remote 127.0.0.1:40]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:24:51.994618 2020] [:error] [pid 5612] [remote 127.0.0.1:40] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:25:41.085552 2020] [:error] [pid 5612] [remote 172.31.38.116:40] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:25:41.085606 2020] [:error] [pid 5612] [remote 172.31.38.116:40] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:25:41.085728 2020] [:error] [pid 5612] [remote 172.31.38.116:40] Traceback (most recent call last):
[Sun Aug 16 02:25:41.085769 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:25:41.085774 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     application = get_wsgi_application()
[Sun Aug 16 02:25:41.085781 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:25:41.085785 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     django.setup(set_prefix=False)
[Sun Aug 16 02:25:41.085800 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:25:41.085803 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:25:41.085809 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:25:41.085812 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     self._setup(name)
[Sun Aug 16 02:25:41.085817 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:25:41.085821 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:25:41.085825 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:25:41.085829 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:25:41.085845 2020] [:error] [pid 5612] [remote 172.31.38.116:40] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:37:55.869666 2020] [:error] [pid 5612] [remote 172.31.38.116:16424] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:37:55.869723 2020] [:error] [pid 5612] [remote 172.31.38.116:16424] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:37:55.869843 2020] [:error] [pid 5612] [remote 172.31.38.116:16424] Traceback (most recent call last):
[Sun Aug 16 02:37:55.869885 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:37:55.869890 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     application = get_wsgi_application()
[Sun Aug 16 02:37:55.869897 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:37:55.869901 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     django.setup(set_prefix=False)
[Sun Aug 16 02:37:55.869907 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:37:55.869910 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:37:55.869916 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:37:55.869920 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     self._setup(name)
[Sun Aug 16 02:37:55.869925 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:37:55.869929 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:37:55.869934 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:37:55.869937 2020] [:error] [pid 5612] [remote 172.31.38.116:16424]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:37:55.869965 2020] [:error] [pid 5612] [remote 172.31.38.116:16424] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 02:52:07.767913 2020] [:error] [pid 5612] [remote 172.31.38.116:40] mod_wsgi (pid=5612): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 02:52:07.767967 2020] [:error] [pid 5612] [remote 172.31.38.116:40] mod_wsgi (pid=5612): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 02:52:07.768088 2020] [:error] [pid 5612] [remote 172.31.38.116:40] Traceback (most recent call last):
[Sun Aug 16 02:52:07.768131 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 02:52:07.768136 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     application = get_wsgi_application()
[Sun Aug 16 02:52:07.768143 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 02:52:07.768147 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     django.setup(set_prefix=False)
[Sun Aug 16 02:52:07.768153 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 02:52:07.768156 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 02:52:07.768162 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 02:52:07.768166 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     self._setup(name)
[Sun Aug 16 02:52:07.768171 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 02:52:07.768175 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     self._wrapped = Settings(settings_module)
[Sun Aug 16 02:52:07.768180 2020] [:error] [pid 5612] [remote 172.31.38.116:40]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 02:52:07.768184 2020] [:error] [pid 5612] [remote 172.31.38.116:40]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 02:52:07.768201 2020] [:error] [pid 5612] [remote 172.31.38.116:40] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 03:17:58.539007 2020] [mpm_prefork:notice] [pid 5607] AH00169: caught SIGTERM, shutting down
[Sun Aug 16 03:17:59.645395 2020] [suexec:notice] [pid 7614] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Aug 16 03:17:59.661479 2020] [so:warn] [pid 7614] AH01574: module wsgi_module is already loaded, skipping
[Sun Aug 16 03:17:59.664025 2020] [http2:warn] [pid 7614] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Aug 16 03:17:59.664039 2020] [http2:warn] [pid 7614] AH02951: mod_ssl does not seem to be enabled
[Sun Aug 16 03:17:59.664584 2020] [lbmethod_heartbeat:notice] [pid 7614] AH02282: No slotmem from mod_heartmonitor
[Sun Aug 16 03:17:59.664649 2020] [:warn] [pid 7614] mod_wsgi: Compiled for Python/3.6.2.
[Sun Aug 16 03:17:59.664653 2020] [:warn] [pid 7614] mod_wsgi: Runtime using Python/3.6.11.
[Sun Aug 16 03:17:59.666976 2020] [mpm_prefork:notice] [pid 7614] AH00163: Apache/2.4.43 (Amazon) mod_wsgi/3.5 Python/3.6.11 configured -- resuming normal operations
[Sun Aug 16 03:17:59.666994 2020] [core:notice] [pid 7614] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Aug 16 03:18:02.654261 2020] [:error] [pid 7619] [remote 127.0.0.1:0] mod_wsgi (pid=7619): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 03:18:02.654321 2020] [:error] [pid 7619] [remote 127.0.0.1:0] mod_wsgi (pid=7619): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 03:18:02.654782 2020] [:error] [pid 7619] [remote 127.0.0.1:0] Traceback (most recent call last):
[Sun Aug 16 03:18:02.654823 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 03:18:02.654828 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     application = get_wsgi_application()
[Sun Aug 16 03:18:02.654834 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 03:18:02.654837 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     django.setup(set_prefix=False)
[Sun Aug 16 03:18:02.654843 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 03:18:02.654846 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 03:18:02.654851 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 03:18:02.654854 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     self._setup(name)
[Sun Aug 16 03:18:02.654859 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 03:18:02.654862 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     self._wrapped = Settings(settings_module)
[Sun Aug 16 03:18:02.654867 2020] [:error] [pid 7619] [remote 127.0.0.1:0]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 03:18:02.654871 2020] [:error] [pid 7619] [remote 127.0.0.1:0]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 03:18:02.654886 2020] [:error] [pid 7619] [remote 127.0.0.1:0] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 03:18:03.658029 2020] [:error] [pid 7619] [remote 127.0.0.1:48] mod_wsgi (pid=7619): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 03:18:03.658079 2020] [:error] [pid 7619] [remote 127.0.0.1:48] mod_wsgi (pid=7619): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 03:18:03.658207 2020] [:error] [pid 7619] [remote 127.0.0.1:48] Traceback (most recent call last):
[Sun Aug 16 03:18:03.658250 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 03:18:03.658255 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     application = get_wsgi_application()
[Sun Aug 16 03:18:03.658262 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 03:18:03.658266 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     django.setup(set_prefix=False)
[Sun Aug 16 03:18:03.658271 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 03:18:03.658274 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 03:18:03.658280 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 03:18:03.658283 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     self._setup(name)
[Sun Aug 16 03:18:03.658288 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 03:18:03.658300 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     self._wrapped = Settings(settings_module)
[Sun Aug 16 03:18:03.658306 2020] [:error] [pid 7619] [remote 127.0.0.1:48]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 03:18:03.658309 2020] [:error] [pid 7619] [remote 127.0.0.1:48]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 03:18:03.658326 2020] [:error] [pid 7619] [remote 127.0.0.1:48] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 03:18:04.661085 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] mod_wsgi (pid=7619): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 03:18:04.661133 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] mod_wsgi (pid=7619): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 03:18:04.661279 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] Traceback (most recent call last):
[Sun Aug 16 03:18:04.661319 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 03:18:04.661324 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     application = get_wsgi_application()
[Sun Aug 16 03:18:04.661331 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 03:18:04.661335 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     django.setup(set_prefix=False)
[Sun Aug 16 03:18:04.661340 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 03:18:04.661344 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 03:18:04.661349 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 03:18:04.661353 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     self._setup(name)
[Sun Aug 16 03:18:04.661358 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 03:18:04.661361 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     self._wrapped = Settings(settings_module)
[Sun Aug 16 03:18:04.661366 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 03:18:04.661374 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 03:18:04.661389 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 03:18:05.664237 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] mod_wsgi (pid=7619): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 03:18:05.664287 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] mod_wsgi (pid=7619): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 03:18:05.664413 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] Traceback (most recent call last):
[Sun Aug 16 03:18:05.664452 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 03:18:05.664456 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     application = get_wsgi_application()
[Sun Aug 16 03:18:05.664463 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 03:18:05.664475 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     django.setup(set_prefix=False)
[Sun Aug 16 03:18:05.664481 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 03:18:05.664484 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 03:18:05.664490 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 03:18:05.664493 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     self._setup(name)
[Sun Aug 16 03:18:05.664498 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 03:18:05.664501 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     self._wrapped = Settings(settings_module)
[Sun Aug 16 03:18:05.664506 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 03:18:05.664509 2020] [:error] [pid 7619] [remote 127.0.0.1:16436]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 03:18:05.664524 2020] [:error] [pid 7619] [remote 127.0.0.1:16436] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
[Sun Aug 16 03:19:12.945198 2020] [:error] [pid 7619] [remote 172.31.6.91:52] mod_wsgi (pid=7619): Target WSGI script '/opt/python/current/app/cliquefit/wsgi.py' cannot be loaded as Python module.
[Sun Aug 16 03:19:12.945276 2020] [:error] [pid 7619] [remote 172.31.6.91:52] mod_wsgi (pid=7619): Exception occurred processing WSGI script '/opt/python/current/app/cliquefit/wsgi.py'.
[Sun Aug 16 03:19:12.945403 2020] [:error] [pid 7619] [remote 172.31.6.91:52] Traceback (most recent call last):
[Sun Aug 16 03:19:12.945442 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/current/app/cliquefit/wsgi.py", line 7, in <module>
[Sun Aug 16 03:19:12.945448 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     application = get_wsgi_application()
[Sun Aug 16 03:19:12.945455 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
[Sun Aug 16 03:19:12.945459 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     django.setup(set_prefix=False)
[Sun Aug 16 03:19:12.945465 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
[Sun Aug 16 03:19:12.945468 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Aug 16 03:19:12.945474 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 79, in __getattr__
[Sun Aug 16 03:19:12.945478 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     self._setup(name)
[Sun Aug 16 03:19:12.945483 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 66, in _setup
[Sun Aug 16 03:19:12.945487 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     self._wrapped = Settings(settings_module)
[Sun Aug 16 03:19:12.945492 2020] [:error] [pid 7619] [remote 172.31.6.91:52]   File "/opt/python/run/venv/local/lib/python3.6/site-packages/django/conf/__init__.py", line 176, in __init__
[Sun Aug 16 03:19:12.945496 2020] [:error] [pid 7619] [remote 172.31.6.91:52]     raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[Sun Aug 16 03:19:12.945514 2020] [:error] [pid 7619] [remote 172.31.6.91:52] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

To unsubscribe from this group and stop receiving emails from it, send an email to mod...@googlegroups.com.

Graham Dumpleton

unread,
Aug 16, 2020, 1:01:34 AM8/16/20
to mod...@googlegroups.com
As the message say:

    django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

So you are possibly trying to set SECRET_KEY in the Django settings file to the value of environment variable, but because that environment variable isn't going to be set, it ends up being empty.

Suggest you search StackOverflow for a solution.

To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/c4c93035-1982-49e9-b816-449dab5a3620o%40googlegroups.com.

Daanish Faiz

unread,
Aug 16, 2020, 2:04:42 AM8/16/20
to modwsgi
Thank you for pointing that out and for the direction - I will search for a solution. 

Thanks again for helping out!
Reply all
Reply to author
Forward
0 new messages