SonarQube Helm Chart with Azure SQL

Hi everyone,

I am trying to deploy SonarQube helm chart with an external database in Azure SQL.

For this i’m using this helm chart (by default it supports postgres):

I tried to install this helm chart using the following parameters:

`helm upgrade --install -f values.yaml -n sonarqube sonarqube-lts ./ --set postgresql.enabled=false --set jdbcUrlOverride="jdbc:sqlserver://newdb.database.windows.net:1433;database=testdb;user=user@newdb;password=pass" --set service.type="LoadBalancer" `

The deployment looks to be installed, the sonarqube pod running but it shows some issue with the HTTP server.

2021.08.26 08:15:53 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.11/sun.nio.ch.EPoll.wait(Native Method)\n java.base@11.0.11/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.select(Unknown Source)\n app//org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:343)\n app//org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)\n app//org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)\n java.base@11.0.11/java.lang.Thread.run(Unknown Source)
2021.08.26 08:15:53 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [I/O dispatcher1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.11/sun.nio.ch.EPoll.wait(Native Method)\n java.base@11.0.11/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.select(Unknown Source)\n app//org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:255)\n app//org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)\n app//org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)\n java.base@11.0.11/java.lang.Thread.run(Unknown Source)
2021.08.26 08:15:53 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [I/O dispatcher2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.11/sun.nio.ch.EPoll.wait(Native Method)\n java.base@11.0.11/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)\n java.base@11.0.11/sun.nio.ch.SelectorImpl.select(Unknown Source)\n app//org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:255)\n app//org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)\n app//org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)\n java.base@11.0.11/java.lang.Thread.run(Unknown Source)
2021.08.26 08:15:54 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.08.26 08:15:54 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process

I am not pretty sure what is the way (using this helm chart) to use it with an external database (Azure SQL). Also, mention that i am no getting any issue when running a regular sonarqube deployment with the Azure SQL (not using helm).

It looks like it cannot connect into the database according to this message on the logs:

Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc.’).
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:118)
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:83)
… 24 common frames omitted
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (Login failed for user ‘sonarUser’. ClientConnectionId:d1524f2e-189f-4776-971c-9059dc67746b)

it seems that does not get correctly the password… i am using simbols like @ and $. I tried to write “/” after those simbols on the password but it does not work:

`helm upgrade --install -f values.yaml -n sonarqube sonarqube-lts ./ --set postgresql.enabled=false --set jdbcUrlOverride="jdbc:sqlserver://newdb.database.windows.net:1433;database=testdb;user=user@newdb;password=pass@/$/$@" --set service.type="LoadBalancer" `

but the logs shows different password than i specified....

Regards,

Hi @Xiny ,

this is not very intuitive, but try to set postgresql.postgresqlUsername , postgresql.postgresqlPassword and postgresql.postgresqlDatabase to the values that would match your database.

Somebody raised the same issue today in the github issues of the helm chart as well. Using the helm chart with AzureSQL · Issue #82 · SonarSource/helm-chart-sonarqube · GitHub
is this you my any chance?

yes me and one member of my team are working on the same. We’ll track this on github then.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.