SonarQube with Postgres

(Tweety Darling) #1

I tried to configure sonarqube (7.6) to use postgresql database and it seems to ignore the jdbc entries in the and picks up the H2 database. When I pass the properties as jvm parameters, it picks up fine. How do I configure sonar to use postgres from the


Log snippet:

2019.03.25 05:42:03 INFO web[o.s.s.e.EsClientProvider] Connected to local Elasticsearch: []
2019.03.25 05:42:03 INFO web[o.s.s.p.LogServerVersion] SonarQube Server / / d56689a5eb122c06cf87375828085609f5a68323
2019.03.25 05:42:03 INFO web[o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://
2019.03.25 05:42:03 INFO web[o.s.s.p.d.EmbeddedDatabase] Embedded database started. Data stored in: /opt/sonarqube/data
2019.03.25 05:42:03 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://
2019.03.25 05:42:03 WARN web[o.s.db.dialect.H2] H2 database should be used for evaluation purpose only.
2019.03.25 05:42:05 INFO web[o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube

(Julien Lancelot) #2


Are you sure you don’t have another sonar.jdbc.url entry ?
Could you search for the text ‘h2’ in the file ?

Julien Lancelot

(Tweety Darling) #3

The has only 4 lines as pasted above. I removed all the entries from the default and kept only the jdbc and log properties there.

(Julien Lancelot) #4

Are you using a Docker image ? Are you sure the is in a folder that can be read by SonarQube ?

(Tweety Darling) #5

Yes. I’m using a docker image. The are located in conf/ and the properties file seems to be used by sonarQube. The ‘sonar.log.level=DEBUG’ seems to come into effect and starts logging ‘debug’ level events.

(Julien Lancelot) #6

Then I’m sorry but I’ve not idea what is not working…

(Tweety Darling) #7

no worries. I went with the JVM parameters approach and it works fine. Thank you for your help!