Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-

Hi team,
I am struggling with this problem, my Sonarqube Pod (deployed on Kuberenetes using helm) is running ok, but as soon as I authenticate LDAP (edit in the values.yaml) the Sonarqube keeps restarting. Even though I have changed the value back but it keeps failing.
This is the case I found a reference with mine. In this case Stenberg used external database. In my case, I used built-in PostgreSQL database.

Logs:

**Caused by: java.lang.IllegalStateException: Unable to start database**
        at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:88)
        at org.sonar.server.platform.db.EmbeddedDatabase.start(EmbeddedDatabase.java:63)
        at org.sonar.server.platform.db.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:49)
        at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
        ... 24 common frames omitted
**Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-210]**
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:529)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
        at org.h2.message.DbException.get(DbException.java:227)
        at org.h2.message.DbException.get(DbException.java:203)
        at org.h2.message.DbException.get(DbException.java:192)

helm chart:

jdbcOverwrite:
  enable: false
postgresql:
  enabled: true

Hi,

Based on the error, you’re not using Postgres. Instead, you’re falling back to H2, which isn’t supported for production.

You need to take a closer look at your DB connection settings.

 
HTH,
Ann

Hi Ann,
Thanks for your response.
I can connect the DB to the Sonarqube.
Here is what I did in the value, in case someone needs it, but remember to create a table name “sonarqube” in the Postgres pod, by then the Sonarqube can connect to DB pod:

sonarProperties:
  sonar.jdbc.url: jdbc:postgresql://sonarqube-postgresql.sonarqube.svc.cluster.local:5432/sonarqube
postgresql:
  # Enable to deploy the PostgreSQL chart
  enabled: true
  host: sonarqube-postgresql.sonarqube.svc.cluster.local
  database: sonarqube
  username: sonarqube
  password: XXXXXX
1 Like