LDAP configuration raises ImportError
I am trying to setup a fresh mayan instance with a connection to an LDAP server (OpenLDAP). I followed the instructions on Dockerhub to setup and customize the mayan docker container with LDAP support.
This is the command I used to start the container:
sudo docker run -d --name mayan-edms --restart=always -p 81:80 -v mayan_data:/var/lib/mayan -e MAYAN_APT_INSTALLS="libldap2-dev libsasl2-dev libssl-dev" -e MAYAN_PIP_INSTALLS="ldap django-auth-ldap" mayanedms/mayanedms:2.7.2-2
Then I edited /var/lib/docker/volumes/mayan_data/_data/settings/local.py
with the LDAP settings as outlined in contrib/settings/ldap_connection_settings.py. This results in an error message upon login, even when I try to login with the local admin account. Without the LDAP settings in local.py
this works fine.
I did some digging around and found an error log inside the container:
root@0fbe378f5134:/# cat /usr/local/lib/python2.7/dist-packages/mayan/error.log
2017-09-08 13:22:48,655 common.middleware.error_logging <279> [ERROR] "process_exception() line 17 Exception caught by request middleware; <WSGIRequest: POST '/authentication/login/'>, No module named settings_local"
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/mayan/apps/authentication/views.py", line 40, in login_view
result = login(request, extra_context=extra_context, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py", line 47, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py", line 81, in login
if form.is_valid():
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 169, in is_valid
return self.is_bound and not self.errors
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 161, in errors
self.full_clean()
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 371, in full_clean
self._clean_form()
File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 398, in _clean_form
cleaned_data = self.clean()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 191, in clean
self.user_cache = authenticate(username=username, password=password)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py", line 66, in authenticate
for backend, backend_path in _get_backends(return_tuples=True):
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py", line 27, in _get_backends
backend = load_backend(backend_path)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py", line 21, in load_backend
return import_string(path)()
File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named settings_local
Is there something I am doing wrong or is this an actual issue?