LDAP connection open failed

136 views
Skip to first unread message

Tim Lung Wong

unread,
Jul 18, 2024, 4:23:14 AM7/18/24
to CAS Community
I am running CAS 6.6 with war overlay and I am adding LDAP auth but I got the following errors. I tested with ldapsearch and is no problem.
I only hit this error when I try login, and there is no error when the cas started.
Could anyone see if there is any clue?

2024-07-18 03:05:54,892 ERROR [org.ldaptive.transport.netty.NettyConnection] - <Connection open failed for org.ldaptive.transport.netty.NettyConnection@480691328::ldapUrl=[org.ldaptive.LdapURL@-664724103::scheme=ldap, hostname=lldap, port=3890, baseDn=null, attributes=null, scope=null, filter=null, inetAddress=null], isOpen=true, connectTime=2024-07-18T03:04:41.470747Z, connectionConfig=[org.ldaptive.ConnectionConfig@1815079573::ldapUrl=ldap://lldap:3890, connectTimeout=PT5S, responseTimeout=PT5S, reconnectTimeout=PT2M, autoReconnect=true, autoReconnectCondition=org.ldaptive.ConnectionConfig$$Lambda$1705/0x000000084096a440@65698020, autoReplay=true, sslConfig=[org.ldaptive.ssl.SslConfig@1859681487::credentialConfig=null, trustManagers=null, hostnameVerifier=org.ldaptive.ssl.DefaultHostnameVerifier@4d4600fb, enabledCipherSuites=null, enabledProtocols=null, handshakeCompletedListeners=null, handshakeTimeout=PT1M], useStartTLS=false, connectionInitializers=[org.ldaptive.BindConnectionInitializer@663512999::bindDn=uid=admin,ou=people,dc=example,dc=com, bindSaslConfig=null, bindControls=null], connectionStrategy=[org.ldaptive.ActivePassiveConnectionStrategy@1934770572::ldapURLSet=[org.ldaptive.LdapURLSet@1294553325::active=[[org.ldaptive.LdapURL@-664724103::scheme=ldap, hostname=lldap, port=3890, baseDn=null, attributes=null, scope=null, filter=null, inetAddress=null]], inactive=[]], activateCondition=org.ldaptive.transport.TransportConnection$$Lambda$1712/0x00000008409af840@3095d06b, retryCondition=org.ldaptive.AbstractConnectionStrategy$$Lambda$1708/0x0000000840969040@1be427b4, initialized=true], connectionValidator=null, transportOptions={}], channel=[id: 0x4396ae7b, L:/172.18.0.5:51410 - R:lldap/172.18.0.4:3890]>
java.lang.IllegalStateException: Operation in progress, cannot send bind request
        at org.ldaptive.transport.netty.NettyConnection$BindOperationHandle.execute(NettyConnection.java:1227) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.netty.NettyConnection$BindOperationHandle.execute(NettyConnection.java:1184) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.BindConnectionInitializer.initialize(BindConnectionInitializer.java:216) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.netty.NettyConnection.open(NettyConnection.java:311) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.TransportConnection.strategyOpen(TransportConnection.java:171) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.TransportConnection.reopen(TransportConnection.java:128) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.netty.NettyConnection.reconnect(NettyConnection.java:1075) ~[ldaptive-2.1.1.jar!/:?]
        at org.ldaptive.transport.netty.NettyConnection$CloseFutureListener.lambda$operationComplete$0(NettyConnection.java:1280) ~[ldaptive-2.1.1.jar!/:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:829) ~[?:?]

King, Robert

unread,
Jul 18, 2024, 7:40:44 AM7/18/24
to cas-...@apereo.org

Do you have cas.authn.ldap[0].base-dn= defined?  The log entry says baseDn=null.

 

Also, on an off chance, the URI looks odd.   Double L in the hostname and non-standard port.

 

 

--
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/32fd5411-1eb2-448d-b58a-5609e6af4d08n%40apereo.org.

Tim Lung Wong

unread,
Jul 18, 2024, 11:22:26 AM7/18/24
to CAS Community, King, Robert
I am sure the basic config is correct, and if there is wrong config the application will not start.
The ldap I am using is called lldap, and now I changed to openldap and it is fine.

Reply all
Reply to author
Forward
0 new messages