Adding LDAP authentication results in ImportError
I followed the directions here: https://docs.mayan-edms.com/topics/settings.html using the latest docker image from docker hub. Everything worked properly, as expected, with basic configuration settings. I added an LDAP configuration in the mayan_settings folder named simply: ldap.py. I've used the contrib/settings/ldap_connection_settings.py file from this repo, obviously replacing my own LDAP values and adding the "from mayan.settings.production import *" as indicated in the docs as the 2nd line in the file after the "from future import absolute_import" line and removed the " from .base import * # NOQA" line (it was causing stack traces on startup). Server started successfully after adding: -e MAYAN_SETTINGS_MODULE=mayan_settings.ldap. After attempting to log in the freshly restarted container, I get this stack trace from the logs:
[2019-03-06 17:41:53 +0000] [387] [INFO] Booting worker with pid: 387 3/6/2019 9:42:23 AMcommon.middleware.error_logging <386> [ERROR] "process_exception() line 17 Exception caught by request middleware; <WSGIRequest: POST '/authentication/login/'>, No module named settings_local" 3/6/2019 9:42:23 AMTraceback (most recent call last): 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response 3/6/2019 9:42:23 AM response = wrapped_callback(request, *callback_args, **callback_kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/authentication/views.py", line 60, in login_view 3/6/2019 9:42:23 AM result = login(request, extra_context=extra_context, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 54, in inner 3/6/2019 9:42:23 AM return func(*args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 150, in login 3/6/2019 9:42:23 AM )(request) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view 3/6/2019 9:42:23 AM return self.dispatch(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 67, in _wrapper 3/6/2019 9:42:23 AM return bound_func(*args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper 3/6/2019 9:42:23 AM return view(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 63, in bound_func 3/6/2019 9:42:23 AM return func.__get__(self, type(self))(*args2, **kwargs2) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 67, in _wrapper 3/6/2019 9:42:23 AM return bound_func(*args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view 3/6/2019 9:42:23 AM response = view_func(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 63, in bound_func 3/6/2019 9:42:23 AM return func.__get__(self, type(self))(*args2, **kwargs2) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 67, in _wrapper 3/6/2019 9:42:23 AM return bound_func(*args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func 3/6/2019 9:42:23 AM response = view_func(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/decorators.py", line 63, in bound_func 3/6/2019 9:42:23 AM return func.__get__(self, type(self))(*args2, **kwargs2) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 90, in dispatch 3/6/2019 9:42:23 AM return super(LoginView, self).dispatch(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch 3/6/2019 9:42:23 AM return handler(request, *args, **kwargs) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 182, in post 3/6/2019 9:42:23 AM if form.is_valid(): 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/forms/forms.py", line 183, in is_valid 3/6/2019 9:42:23 AM return self.is_bound and not self.errors 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/forms/forms.py", line 175, in errors 3/6/2019 9:42:23 AM self.full_clean() 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/forms/forms.py", line 385, in full_clean 3/6/2019 9:42:23 AM self._clean_form() 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/forms/forms.py", line 412, in _clean_form 3/6/2019 9:42:23 AM cleaned_data = self.clean() 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 187, in clean 3/6/2019 9:42:23 AM self.user_cache = authenticate(self.request, username=username, password=password) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 68, in authenticate 3/6/2019 9:42:23 AM for backend, backend_path in _get_backends(return_tuples=True): 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 29, in _get_backends 3/6/2019 9:42:23 AM backend = load_backend(backend_path) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 23, in load_backend 3/6/2019 9:42:23 AM return import_string(path)() 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string 3/6/2019 9:42:23 AM module = import_module(module_path) 3/6/2019 9:42:23 AM File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module 3/6/2019 9:42:23 AM __import__(name) 3/6/2019 9:42:23 AM File "/opt/mayan-edms/local/lib/python2.7/site-packages/gevent/builtins.py", line 96, in __import__ 3/6/2019 9:42:23 AM result = _import(*args, **kwargs) 3/6/2019 9:42:23 AMImportError: No module named settings_local
...and the login page reloads with no error message.
I've checked the contents of /var/lib/mayan/mayan_settings and I DO see an init.py and init.pyc file generated in the folder. If I remove the "-e MAYAN_SETTINGS_MODULE=mayan_settings.ldap" from the docker startup command, it starts and runs successfully. I'm NOT a python/django developer, so I'm at a loss as to where to look.