Upgrade 8.9 LTS to 9.9 LTS - Not using MsSQL anymore

Hello,

we updated from 8.9 LTS to 9.9 LTS. But now, Sonarqube is not using our SQL Server anymore. Instead, is uses the default H2 database. We do not change anything on the configuration. The Server runs with docker compose.

Configuration:

version: '3.3'
 
services:
  sonarqube:
    image: sonarqube:lts-developer
    command: "-Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmap=false"
    ports:
      - "9000:9000"
    volumes:
      - sonarqube-conf:/opt/sonarqube/conf
      - sonarqube-data:/opt/sonarqube/data
      - sonarqube-extensions:/opt/sonarqube/extensions
      - sonarqube-bundled-plugins:/opt/sonarqube/lib/bundled-plugins
    environment:
    - SONAR_JDBC_URL=jdbc:sqlserver://xxx.database.windows.net:1433;databaseName=Bxxx;
    - SONAR_JDBC_USERNAME=xxx
    - SONAR_JDBC_PASSWORD=xxx
    - SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
   
volumes:
  sonarqube-conf:
      external: true
  sonarqube-data:
      external: true
  sonarqube-extensions:
      external: true
  sonarqube-bundled-plugins:
      external: true

With 8.9 LTS and this configuration, all runs fine without any issues. Updates within 8.9 and restarts where no problems.

What can we do now?

Problem solved. We fiddling around with different configurations , but without any success. Now, we ended with the exact same configuration from above, and all works. I cannot see any differences.

1 Like

Hi I encounter the same issues also the same version from 8.9 to 9.9 I also noticed that the mssql is not connecting to my sonarqube server, may I know what tweak did you do to make it work?/
Ive been changing configurations over and over but I couldnt make it work.

Hello,

we don’t know exactly what solved the issue. We are using now the exact same configuration from above.

Hint: From 8.x to 9.x, the Names of the envrionment variables changed from SONARQUBE_ to SONAR_

Hi Martin,
Hoping that all is well with you.
Did you get yours to work? We have almost the same config as Jesen but we cannot get ours to talk to our SQL anymore. Any tips is much appreciated.
Thanks,
D

Hello,

yes, our server is running again. But we cannot exactly tell how we solved the issue. We tried several things, configurations and ended up with the exact same configuration as above and before and it works now.

Hint: Check the names of the environment variables. They changed from SONARQUBE_ to SONAR_.

Hello Martin,
Thanks for the tip… for some reason ours still not working. We tried to isolate sonarqube and the mssql database containers and this time, the error is making more sense. ATM we don’t know why we started getting this error…

sonarqube_1 | 2023.04.13 19:52:30 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://database_1:1433;databaseName=sonar
sonarqube_1 | 2023.04.13 19:52:30 INFO web[c.z.h.HikariDataSource] HikariPool-1 - Starting…
sonarqube_1 | 2023.04.13 19:52:31 ERROR web[c.z.h.p.HikariPool] HikariPool-1 - Exception during pool initialization.
sonarqube_1 | com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”. ClientConnectionId:0b456f80-3864-4222-a5dc-005bdd5a1f84

Note: using version 9.3-developer, we never had this problem talking to our database. Any insight is much appreciated.

Thanks,
D