LDAP Connection failing in the Sonarqube docker container

Hi All,

I am facing below issue when configuring the LDAP in the Docker Container 9.2.3 version. When I placed the same config settings in the sonar standalone (without docker) it is working without issues. I tested the telnet connections also which is working correctly. Not sure What am i missing here. Went through the some threads in this channel came know that we need to add some certs to the docker container, but I am unsure about those certs and I dont have any. Please help me on this regard.

2022.02.11 15:43:51 INFO  web[][o.s.a.l.LdapContextFactory] Test LDAP connection: FAIL
2022.02.11 15:43:51 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.api.utils.SonarException: Security realm fails to start: Unable to open LDAP connection
        at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:93)
        at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
        at org.picocontainer.behaviors.Stored.start(Stored.java:110)
        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
        at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
        at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:583)
        at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
        at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
        at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
        at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
        at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: org.sonar.auth.ldap.LdapException: Unable to open LDAP connection
        at org.sonar.auth.ldap.LdapContextFactory.testConnection(LdapContextFactory.java:214)
        at org.sonar.auth.ldap.LdapRealm.init(LdapRealm.java:63)
        at org.sonar.server.user.SecurityRealmFactory.start(SecurityRealmFactory.java:87)
        ... 18 common frames omitted
Caused by: javax.naming.CommunicationException: Connection or outbound has closed
        at java.naming/com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3432)
        at java.naming/javax.naming.ldap.InitialLdapContext.extendedOperation(InitialLdapContext.java:184)
        at org.sonar.auth.ldap.LdapContextFactory.createInitialDirContext(LdapContextFactory.java:119)
        at org.sonar.auth.ldap.LdapContextFactory.createBindContext(LdapContextFactory.java:95)
        at org.sonar.auth.ldap.LdapContextFactory.testConnection(LdapContextFactory.java:210)
        ... 20 common frames omitted
Caused by: java.net.SocketException: Connection or outbound has closed
        at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1217)
        at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
        at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
        at java.naming/com.sun.jndi.ldap.Connection.writeRequest(Connection.java:414)
        at java.naming/com.sun.jndi.ldap.Connection.writeRequest(Connection.java:387)
        at java.naming/com.sun.jndi.ldap.LdapClient.extendedOp(LdapClient.java:1204)
        at java.naming/com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3379)
        ... 24 common frames omitted
		
2022.02.11 15:43:51 DEBUG web[][o.s.s.p.Platform] Background initialization of SonarQube done
2022.02.11 15:43:51 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2022.02.11 15:43:51 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection manager is shutting down
2022.02.11 15:43:51 DEBUG web[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:46052<->127.0.0.1:9001[ACTIVE][r:r]: Close
2022.02.11 15:43:51 DEBUG web[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [CLOSED]: Disconnected
2022.02.11 15:43:51 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection manager shut down
2022.02.11 15:43:51 DEBUG web[][o.s.s.a.TomcatAccessLog] Tomcat is stopped

Thanks,
Prasad.