Failed to preload connection to domain xx.xxxxxx.int. #10
Replies: 1 comment
-
It seems you are unable to establish an LDAP connection with the server. I think the best approach to troubleshoot this problem is to first try connecting using LDAP3 manually from a python console, then replicate the settings in the Django project. Check out LDAP3's docs for tutorial on establishing LDAP connection. (BTW Sorry for the delayed response, I was traveling without my computer) |
Beta Was this translation helpful? Give feedback.
-
C:\scripts\WindowsAuthorityLogin\WindowsAuthorityLoin\account\views.py changed, reloading. Failed to preload connection to domain xx.xxxxxx.int. Traceback (most recent call last): File "C:\software\Anaconda3\envs\django_new\lib\site-packages\windows_auth\apps.py", line 50, in ready manager = get_ldap_manager(domain) File "C:\software\Anaconda3\envs\django_new\lib\site-packages\windows_auth\ldap.py", line 122, in get_ldap_manager _ldap_connections[domain] = LDAPManager(domain, settings=settings) File "C:\software\Anaconda3\envs\django_new\lib\site-packages\windows_auth\ldap.py", line 20, in __init__ self._conn = self._create_connection() File "C:\software\Anaconda3\envs\django_new\lib\site-packages\windows_auth\ldap.py", line 45, in _create_connection return Connection( File "C:\software\Anaconda3\envs\django_new\lib\site-packages\ldap3\core\connection.py", line 363, in __init__ self._do_auto_bind() File "C:\software\Anaconda3\envs\django_new\lib\site-packages\ldap3\core\connection.py", line 412, in _do_auto_bind raise LDAPBindError(error) ldap3.core.exceptions.LDAPBindError: automatic bind not successful - invalidCredentials
It can work in my local pc but it will show the above error information. my window domin need ""USE_SSL": True"
if i put the script in IIS, I got this error:
Error occurred while reading WSGI handler: Traceback (most recent call last): File "E:\django_new\Lib\site-packages\wfastcgi.py", line 791, in main env, handler = read_wsgi_handler(response.physical_path) File "E:\django_new\Lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler handler = get_wsgi_handler(os.getenv("WSGI_HANDLER")) File "E:\django_new\Lib\site-packages\wfastcgi.py", line 616, in get_wsgi_handler raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb)) ValueError: "WindowsAuthorityLoin.wsgi.application" could not be imported: Traceback (most recent call last): File "E:\django_new\lib\site-packages\ldap3\core\tls.py", line 32, in import ssl File "E:\django_new\lib\ssl.py", line 98, in import _ssl # if we can't import it, let the error propagate ImportError: DLL load failed while importing _ssl: The specified module could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\django_new\Lib\site-packages\wfastcgi.py", line 600, in get_wsgi_handler handler = __import__(module_name, fromlist=[name_list[0][0]]) File "E:\WindowsAuthorityLoin\.\WindowsAuthorityLoin\wsgi.py", line 16, in application = get_wsgi_application() File "E:\django_new\lib\site-packages\django\core\wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "E:\django_new\lib\site-packages\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "E:\django_new\lib\site-packages\django\apps\registry.py", line 115, in populate app_config.import_models() File "E:\django_new\lib\site-packages\django\apps\config.py", line 301, in import_models self.models_module = import_module(models_module_name) File "E:\django_new\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "E:\django_new\lib\site-packages\windows_auth\models.py", line 8, in from ldap3 import Reader, Entry, Attribute File "E:\django_new\lib\site-packages\ldap3\__init__.py", line 140, in from .core.server import Server File "E:\django_new\lib\site-packages\ldap3\core\server.py", line 35, in from .tls import Tls File "E:\django_new\lib\site-packages\ldap3\core\tls.py", line 36, in raise LDAPSSLNotSupportedError('SSL not supported in this Python interpreter') ldap3.core.exceptions.LDAPSSLNotSupportedError: SSL not supported in this Python interpreter StdOut: StdErr:
Beta Was this translation helpful? Give feedback.
All reactions