Sonarqube Service is Stopping once LDAP configs are added

  • Sonarqube Version: 9.9-enterprise
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: Trying to deploy latest version

Logs:

2023.04.05 23:42:44 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.server.ws.WebServiceEngine': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.server.authentication.ws.AuthenticationWs': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.server.authentication.ws.LoginAction': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.server.authentication.CredentialsAuthentication': Unsatisfied dependency expressed through constructor parameter 4; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.server.authentication.LdapCredentialsAuthentication': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@289710d9-org.sonar.auth.ldap.LdapRealm': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.auth.ldap.LdapRealm]: Constructor threw exception; nested exception is org.sonar.auth.ldap.LdapException: LDAP realm failed to start: Unable to open LDAP connection
2023.04.05 23:42:44 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube```

Hi,

Welcome to the community!

Did you read the logs you posted? What do you make of this?

 
Ann

Hi Ann,

Yes, I did read the logs. I have validated the connection to LDAP serve and it’s working fine. But when I enable the LDAP, Sonarqube service is failing with this error.

Sonarqube is deployed using helm to our kubernetes cluster.

The same configuration works fine with Sonarqube 8.9.9 version without any issues.

Thanks,
Sai