Django аутентификация с активным каталогом вызывает внутреннюю ошибку 500 - PullRequest
0 голосов
/ 21 апреля 2020

У меня есть Django веб-приложение, работающее на рабочем сервере CentosOs-7. Я пытаюсь аутентифицировать своего пользователя через корпоративный сервер Active Directory. Тем не менее, я сталкиваюсь с 500 внутренних ошибок сервера при посещении моего веб-приложения. Итак, я посмотрел файл журнала httpd и обнаружил, что

Tue Apr 21 18:15:09.372866 2020] [:error] [pid 32508] [remote 100.120.96.54:21376] mod_wsgi (pid=32508): Exception occurred processing WSGI script '/opt/BsP_v0/kwnProtclBsline_proj/kwnProtclBsline_proj/wsgi.py'.
[Tue Apr 21 18:15:09.372884 2020] [:error] [pid 32508] [remote 100.120.96.54:21376] Traceback (most recent call last):
[Tue Apr 21 18:15:09.372897 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/kwnProtclBsline_proj/wsgi.py", line 16, in <module>
[Tue Apr 21 18:15:09.372917 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     application = get_wsgi_application()
[Tue Apr 21 18:15:09.372924 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/venv/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Tue Apr 21 18:15:09.372936 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     django.setup(set_prefix=False)
[Tue Apr 21 18:15:09.372942 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/venv/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
[Tue Apr 21 18:15:09.372950 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Tue Apr 21 18:15:09.372955 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
[Tue Apr 21 18:15:09.372963 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     self._setup(name)
[Tue Apr 21 18:15:09.372967 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
[Tue Apr 21 18:15:09.372974 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     self._wrapped = Settings(settings_module)
[Tue Apr 21 18:15:09.372979 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
[Tue Apr 21 18:15:09.372986 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue Apr 21 18:15:09.372990 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
[Tue Apr 21 18:15:09.372998 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     __import__(name)
[Tue Apr 21 18:15:09.373003 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/opt/BsP_v0/kwnProtclBsline_proj/kwnProtclBsline_proj/settings.py", line 153, in <module>
[Tue Apr 21 18:15:09.373010 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     AUTH_LDAP_GROUP_TYPE = ActiveDirectoryGroupType()
[Tue Apr 21 18:15:09.373015 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]   File "/usr/lib/python2.7/site-packages/django_auth_ldap/config.py", line 586, in __init__
[Tue Apr 21 18:15:09.373023 2020] [:error] [pid 32508] [remote 100.120.96.54:21376]     super().__init__("member", name_attr)
[Tue Apr 21 18:15:09.373036 2020] [:error] [pid 32508] [remote 100.120.96.54:21376] TypeError: super() takes at least 1 argument (0 given)

Я не уверен, в чем проблема. Я использую python 2.7, django_auth_ldap 2.1.0 и django 1.11.6

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...