LDAP authentication takes more than 5 mins to log in user

Hello

I am using sonarqube 8.4 on docker and I have configured it to use AD via LDAP configuration.
However, after connecting to ldap, when I try to log in to sonarqube server ui, it takes about 10 mins to log in to server.
Please let me know how to resolve this.

Following are some log snippets:-

2020.08.13 13:35:42 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=NAME,OU=OUNAME,DC=dcname,DC=com, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.13 13:35:42 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapGroupsProvider] Requesting groups for user username
2020.08.13 13:35:42 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[username], attributes=[dn]}
2020.08.13 13:35:42 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnname,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.13 13:37:50 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
	at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
	at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
	at org.sonar.auth.ldap.LdapGroupsProvider.searchUserGroups(LdapGroupsProvider.java:116)
	at org.sonar.auth.ldap.LdapGroupsProvider.getGroups(LdapGroupsProvider.java:72)
	at org.sonar.auth.ldap.LdapGroupsProvider.doGetGroups(LdapGroupsProvider.java:57)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.synchronize(CredentialsExternalAuthentication.java:141)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:113)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
	at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
	at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
	at java.naming/com.sun.jndi.ldap.LdapReferralContext.<init>(Unknown Source)
	at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
	... 58 common frames omitted
2020.08.13 13:37:50 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=group)(member={0})), parameters=[CN=cnname,OU=ouname,DC=dcname,DC=com], attributes=[sAMAccountName]}
2020.08.13 13:37:50 DEBUG web[AXPoA+dMldJNXdMLAABh][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnname,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}

Hi,

It looks like your LDAP server isn’t responding. That or perhaps the network traffic is being blocked by a proxy for some reason? I would start with your network folks and/or the folks who admin your LDAP server. We know the request is being sent. Is it being received by LDAP? Is LDAP responding in a timely manner?

 
HTH,
Ann

Hi Ann,

Yes after 5-10 mins I get logged in, but it takes 5-10 mins everytime I want to log in to sonarqube with same user or any of the AD users.

Following is complete log, if this might help you. Let me know if need to configure any parameters and where to configure them.

2020.08.17 12:24:31 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapUsersProvider] Requesting details for user username
2020.08.17 12:24:31 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[username], attributes=[mail, CN]}
2020.08.17 12:24:31 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnusername,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.17 12:24:52 DEBUG web[o.postgresql.Driver] Connecting with URL: jdbc:postgresql://X.X.X.X:port/databasename
2020.08.17 12:24:52 DEBUG web[o.p.c.v.ConnectionFactoryImpl] Trying to establish a protocol version 3 connection to X.X.X.X:port
2020.08.17 12:24:52 DEBUG web[o.p.c.v.ConnectionFactoryImpl] Receive Buffer Size is 186,240
2020.08.17 12:24:52 DEBUG web[o.p.c.v.ConnectionFactoryImpl] Send Buffer Size is 43,520
2020.08.17 12:24:52 DEBUG web[o.p.ssl.MakeSSL] converting regular socket connection to ssl
2020.08.17 12:24:52 DEBUG web[jdk.event.security] TLSHandshake: X.X.X.X:port, TLSv1.3, TLS_AES_256_GCM_SHA384, 2134327622
2020.08.17 12:26:39 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
at org.sonar.auth.ldap.LdapUsersProvider.getUserDetails(LdapUsersProvider.java:80)
at org.sonar.auth.ldap.LdapUsersProvider.doGetUserDetails(LdapUsersProvider.java:58)
at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:96)
at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
at java.naming/com.sun.jndi.ldap.LdapReferralContext.(Unknown Source)
at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
… 56 common frames omitted
2020.08.17 12:26:39 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[username], attributes=null}
2020.08.17 12:26:39 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnusername,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.17 12:27:46 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:46 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:46 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:46 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:27:51 DEBUG es[o.e.i.s.IndexShard] shard is now inactive
2020.08.17 12:28:47 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
at org.sonar.auth.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:67)
at org.sonar.auth.ldap.LdapAuthenticator.doAuthenticate(LdapAuthenticator.java:50)
at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:105)
at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
at java.naming/com.sun.jndi.ldap.LdapReferralContext.(Unknown Source)
at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
… 56 common frames omitted
2020.08.17 12:28:47 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.17 12:28:47 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapGroupsProvider] Requesting groups for user username
2020.08.17 12:28:47 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[username], attributes=[dn]}
2020.08.17 12:28:47 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnusername,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.17 12:30:55 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
at org.sonar.auth.ldap.LdapGroupsProvider.searchUserGroups(LdapGroupsProvider.java:116)
at org.sonar.auth.ldap.LdapGroupsProvider.getGroups(LdapGroupsProvider.java:72)
at org.sonar.auth.ldap.LdapGroupsProvider.doGetGroups(LdapGroupsProvider.java:57)
at org.sonar.server.authentication.CredentialsExternalAuthentication.synchronize(CredentialsExternalAuthentication.java:141)
at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:113)
at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
at java.naming/com.sun.jndi.ldap.LdapReferralContext.(Unknown Source)
at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
… 58 common frames omitted
2020.08.17 12:30:55 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=group)(member={0})), parameters=[CN=username,OU=ouname,DC=dcname,DC=com], attributes=[sAMAccountName]}
2020.08.17 12:30:55 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=cnusername,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://X.X.X.X:389, java.naming.security.authentication=simple}
2020.08.17 12:33:03 DEBUG web[AXP8YA6+a4VBbiE4AAAg][o.s.s.a.UserRegistrarImpl] List of groups returned by the identity provider ‘[group1, group2, group3]’
2020.08.17 12:33:03 DEBUG web[AXP8YA6+a4VBbiE4AAAg][auth.event] login success [method|FORM][provider|REALM|LDAP][IP|172.16.24.165|][login|username]

Blockquote

Hello @ganncamp

Any help on above?

Hi,

 
Ann

Hi @ganncamp

Please take a look at the following request log.
Still facing the long time to log in to sonarqube using ldap. It takes about 8-9 minutes. Please let me know if I can make any changes on sonarqube sonar.properties to solve this.
The network folks state that are not facing similar condition with other applications integrated with same ad server.

2020.09.28 12:51:40 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://Public.Ip.X.X:389, java.naming.security.authentication=simple}
2020.09.28 12:53:48 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
	at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
	at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
	at org.sonar.auth.ldap.LdapUsersProvider.getUserDetails(LdapUsersProvider.java:80)
	at org.sonar.auth.ldap.LdapUsersProvider.doGetUserDetails(LdapUsersProvider.java:58)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:96)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
	at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
	at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
	at java.naming/com.sun.jndi.ldap.LdapReferralContext.<init>(Unknown Source)
	at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
	... 56 common frames omitted
2020.09.28 12:53:48 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[user_name], attributes=null}
2020.09.28 12:53:48 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://Public.Ip.X.X:389, java.naming.security.authentication=simple}
2020.09.28 12:55:01 DEBUG ce[][o.postgresql.Driver] Connecting with URL: jdbc:postgresql://Private.Ip.X.X:5432/dbname
2020.09.28 12:55:01 DEBUG ce[][o.p.c.v.ConnectionFactoryImpl] Trying to establish a protocol version 3 connection to Private.Ip.X.X:5432
2020.09.28 12:55:01 DEBUG ce[][o.p.c.v.ConnectionFactoryImpl] Receive Buffer Size is 186,240
2020.09.28 12:55:01 DEBUG ce[][o.p.c.v.ConnectionFactoryImpl] Send Buffer Size is 43,520
2020.09.28 12:55:01 DEBUG ce[][o.p.ssl.MakeSSL] converting regular socket connection to ssl
2020.09.28 12:55:01 DEBUG ce[][jdk.event.security]  TLSHandshake: Private.Ip.X.X:5432, TLSv1.3, TLS_AES_256_GCM_SHA384, 2134327622
2020.09.28 12:55:56 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
	at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
	at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
	at org.sonar.auth.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:67)
	at org.sonar.auth.ldap.LdapAuthenticator.doAuthenticate(LdapAuthenticator.java:50)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:105)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
	at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
	at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
	at java.naming/com.sun.jndi.ldap.LdapReferralContext.<init>(Unknown Source)
	at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
	... 56 common frames omitted
2020.09.28 12:55:56 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://Public.Ip.X.X:389, java.naming.security.authentication=simple}
2020.09.28 12:55:56 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapGroupsProvider] Requesting groups for user user_name
2020.09.28 12:55:56 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=user)(sAMAccountName={0})), parameters=[user_name], attributes=[dn]}
2020.09.28 12:55:56 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://Public.Ip.X.X:389, java.naming.security.authentication=simple}
2020.09.28 12:56:32 DEBUG web[][o.postgresql.Driver] Connecting with URL: jdbc:postgresql://Private.Ip.X.X:5432/dbname
2020.09.28 12:56:32 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Trying to establish a protocol version 3 connection to Private.Ip.X.X:5432
2020.09.28 12:56:32 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Receive Buffer Size is 186,240
2020.09.28 12:56:32 DEBUG web[][o.p.c.v.ConnectionFactoryImpl] Send Buffer Size is 43,520
2020.09.28 12:56:32 DEBUG web[][o.p.ssl.MakeSSL] converting regular socket connection to ssl
2020.09.28 12:56:32 DEBUG web[][jdk.event.security]  TLSHandshake: Private.Ip.X.X:5432, TLSv1.3, TLS_AES_256_GCM_SHA384, 2134327622
2020.09.28 12:58:04 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] More result might be forthcoming if the referral is followed
javax.naming.PartialResultException: null
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(Unknown Source)
	at org.sonar.auth.ldap.LdapSearch.hasMore(LdapSearch.java:156)
	at org.sonar.auth.ldap.LdapSearch.findUnique(LdapSearch.java:146)
	at org.sonar.auth.ldap.LdapGroupsProvider.searchUserGroups(LdapGroupsProvider.java:116)
	at org.sonar.auth.ldap.LdapGroupsProvider.getGroups(LdapGroupsProvider.java:72)
	at org.sonar.auth.ldap.LdapGroupsProvider.doGetGroups(LdapGroupsProvider.java:57)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.synchronize(CredentialsExternalAuthentication.java:141)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:113)
	at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:90)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:66)
	at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
	at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
	at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1627)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:-1ms.
	at java.naming/com.sun.jndi.ldap.LdapReferralContext.<init>(Unknown Source)
	at java.naming/com.sun.jndi.ldap.LdapReferralException.getReferralContext(Unknown Source)
	at java.naming/com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(Unknown Source)
	... 58 common frames omitted
2020.09.28 12:58:04 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapSearch] Search: LdapSearch{baseDn=DC=dcname,DC=com, scope=subtree, request=(&(objectClass=group)(member={0})), parameters=[CN=username,OU=ouname,DC=dcname,DC=com], attributes=[sAMAccountName]}
2020.09.28 12:58:04 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.security.principal=CN=username,OU=ouname,DC=dcname,DC=com, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.naming.provider.url=ldap://Public.Ip.X.X:389, java.naming.security.authentication=simple}
2020.09.28 13:00:12 DEBUG web[AXTUt4RC3YATIg4fAABc][o.s.s.a.UserRegistrarImpl] List of groups returned by the identity provider '[group1, group2]'
2020.09.28 13:00:12 DEBUG web[AXTUt4RC3YATIg4fAABc][auth.event] login success [method|FORM][provider|REALM|LDAP][IP|172.16.24.165|][login|user_name]

Hi,

I really don’t know what to tell you. Your logs - every one of them - indicate that it’s the LDAP server that isn’t responding. Surely you can see that that’s entirely out of the scope and control of SonarQube?

 
Ann