https://github.com/lldap/lldap logo
Effie - I'm trying to integrate SOGo (https://w...
# troubleshooting
e
I'm trying to integrate SOGo (https://www.sogo.nu/about.html) with LLDAP. My LDAP config in SOGo. When trying to authenticate, I see this in SOGo's log:
Copy code
sogo-fdfb749ff-gcjwr sogo Sep 29 09:09:09 sogod [25]: <0x0x556b8637c0[NGLdapConnection]> Using ldap_initialize for LDAP URL: ldaps://ldap.alphasoft.com
sogo-fdfb749ff-gcjwr sogo Sep 29 09:09:09 sogod [25]: <0x0x556b70b2b0[LDAPSource]> <NSException: 0x556b863660> NAME:LDAPException REASON:operation bind failed: Can't contact LDAP server (0xFFFFFFFF) INFO:{"error_code" = "-1"; login = "uid=arf,ou=people,dc=alphasoft,dc=com"; }
sogo-fdfb749ff-gcjwr sogo Sep 29 09:09:09 sogod [25]: SOGoRootPage Login from '127.0.0.1' for user 'arf' might not have worked - password policy: 65535  grace: -1  expire: -1  bound: 0
And in LLDAP's log:
Copy code
lldap-67f749487d-tknvp lldap 2024-09-29T16:09:09.840702794+00:00  DEBUG    ๐Ÿ› [debug]: decided upon suite TLS13_AES_256_GCM_SHA384 | log.target: "rustls::server::hs" | log.module_path: "rustls::server::hs" | log.file: "/__w/lldap/lldap/${GITHUB_WORKSPACE}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.20.8/src/server/hs.rs" | log.line: 382
lldap-67f749487d-tknvp lldap 2024-09-29T16:09:09.851210674+00:00  INFO     LDAP session [ 419ยตs | 97.89% / 100.00% ]
lldap-67f749487d-tknvp lldap 2024-09-29T16:09:09.852157964+00:00  INFO     โ”•โ” LDAP request [ 8.85ยตs | 2.11% ]
lldap-67f749487d-tknvp lldap 2024-09-29T16:09:09.852603739+00:00  ERROR    ๐Ÿšจ [error]: [LDAPS] Service Error: while handling incoming messages: while receiving LDAP op: unexpected end of file
a
message has been deleted
n
Looks like a problem with LDAP/LDAPS
Did you use the correct port?
e
Yes, I'm running LLDAP in k8s, LLDAP is doing TLS, and I'm using Traefik's IngressRouteTCP to route port 636 to LLDAP on 6360. I have a bunch of things using this, so far SOGo is the only thing I'm having trouble with.
My SOGo LDAP config:
Copy code
SOGoUserSources = (
   {
     type = ldap;
     CNFieldName = cn;
     UIDFieldName = uid;
     IDFieldName = uid; // first field of the DN for direct binds
     SearchFieldNames = (sn, givenname, cn, mail);
     baseDN = "ou=people,dc=alphasoft,dc=com";
     bindDN = "${LDAP_BIND_DN}";
     bindPassword = "${LDAP_BIND_PASSWORD}";
     canAuthenticate = YES;
     passwordPolicy = NO;
     displayName = "Shared Addresses";
     hostname = "ldaps://ldap.alphasoft.com";
     id = public;
     isAddressBook = YES;
   }
  );
n
I might be wrong, but I think sogo is sending plain LDAP messages, not LDAPS
If you try using ldapsearch with the LDAP protocol and port 636, you should get the same error in LLDAP 's logs
e
Could be, I moved from OpenLDAP w/ STARTTLS, SOGo was working okay with that. Maybe I should spin up another LLDAP instance w/o TLS and try that. It does sound like a SOGo TLS issue.
n
LLDAP always has plain LDAP, it's just on a different port
e
Ahh, even easier, it's just another TCP route in Traefik ๐Ÿ˜„
That was it! Configured SOGo to use LDAP protocol and it's working now. ty!
n
No problem! I'll see if I can hook up an error catcher in the right place to clarify the problem, but I think it's a bit far up in the framework to easily access