-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting container fails with ldap.initialize(f"{config['LDAP_URI']}") #9
Comments
Seems to be setup-specific for me. Have you tried to disable SSL? |
Thank you for your response! I set the URI to - LDAP-MAILCOW_LDAP_URI="ldap://1.2.3.4" But the error persists: Aug 17 14:50:09 localhost f12f15c8c8bd[563]: 17.08.20 12:50:09 Config file conf/dovecot/ldap/passdb.conf unchanged
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: 17.08.20 12:50:09 Config file conf/dovecot/extra.conf unchanged
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: 17.08.20 12:50:09 Config file conf/sogo/plist_ldap unchanged
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: Traceback (most recent call last):
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "syncer.py", line 181, in <module>
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: main()
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "syncer.py", line 31, in main
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: sync()
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "syncer.py", line 37, in sync
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: ldap_connector = ldap.initialize(f"{config['LDAP_URI']}")
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "/usr/local/lib/python3.8/site-packages/ldap/functions.py", line 94, in initialize
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: return LDAPObject(
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "/usr/local/lib/python3.8/site-packages/ldap/ldapobject.py", line 115, in __init__
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: self._l = ldap.functions._ldap_function_call(ldap._ldap_module_lock,_ldap.initialize,uri)
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: File "/usr/local/lib/python3.8/site-packages/ldap/functions.py", line 55, in _ldap_function_call
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: result = func(*args,**kwargs)
Aug 17 14:50:09 localhost f12f15c8c8bd[563]: ldap.LDAPError: (0, 'Error') Also tried to remove the protocol entirely, but also the same error. |
So well, as I mentioned before it seems for me to be indeed setup-specific. What I can suggest is to try launching the container with an overridden entrypoint and than looking if you are able to use Besides that I can hardly imagine I can investigate this without remote access. Ah, one more thing I've forgotten... The problem might be also the Bind DN you use (i.e. the difference between import sys, os, string, time, datetime
import ldap
ldap_connector = ldap.initialize(f"ldaps://1.2.3.4")
ldap_connector.set_option(ldap.OPT_REFERRALS, 0)
ldap_connector.simple_bind_s('CN=ldap,DC=OURCOMPANY,DC=LOCAL', 'ChangeMe') |
Thank you for your time and input. Don't thought about changing the entrypoint and debugging in there. But that's a good idea. |
Have you tried using the fqdn instead of the ipaddress? (I assume 1.2.3.4 is the ipaddress of the dc) |
@MrHappy With @Programmierus hint I could deep down a little bit further and saw that the connection was failing due to a self signed cert. Currently I'm preparing a PR for config settings via the docker compose environment variables The connection with the IP worked just fine after allowing self signed certs |
@Clevero |
One thing if you're using AD that you can try is by having the LDAP_URI start with capital letters LDAP-MAILCOW_LDAP_URI=LDAP://1.2.3.4 |
Hello :)
I'm currently trying to install your LDAP integration and followed the install instructions.
After starting the container, the log states that
ldap.initialize(f"{config['LDAP_URI']}")
is throwing an error:My addition to
docker-compose.override.yml
:Steps I tried before opening the issue:
I checked the credentials and some other settings with ldapsearch and could successfully connect to the LDAP server:
I also checked the connectivity to the LDAP server inside a debian based test container with network=host:
After that, I tried to reproduce this behaviour in extra container with python3 and python-ldap installed. The wasn't thrown.
I hope you have some spare time to look through my issue with setting up the integration but totally understand that your support is limited.
The text was updated successfully, but these errors were encountered: