SonarQube Upgrade from 8.9.6 to 9.9 community

  • We are upgrading from sonarqube 8.9.6 version to 9.9
  • SonarQube is deployed in one namespace, this name space has two deployment on k8s, postgress(14) and sonarqube (8.9.6)
  • We took the back up of PV (sonarqube,data and extensions and also postgress data) but While we are upgrading the version in deployment.yml to desired number projects vanished and it installs with H2 database.

Anything we are doing wrong?

Hi,

Going from 8.9.* to 9.9.2 is a major upgrade, and some things changed. Specifically, the names of the envvars to use changed from SONARQUBE* to SONAR*. So presumably you used the old var names to connect to the new version & 9.2 didn’t see your DB connection data and defaulted back to H2.

You may find these resources helpful:

 
HTH,
Ann

so here is my observation, till I upgraded to version 9.8 it was taking my database postgres14, but when i changed the image tag to 9.9-community, it took default h2 as database.

2023.10.10 14:50:56 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[COMPUTE_ENGINE] from [/opt/sonarqube]: /opt/java/openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.9.2.77730.jar:/opt/sonarqube/lib/jdbc/h2/h2-2.1.214.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process11838413065221621824properties

2023.10.10 14:50:56 INFO web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning will be disabled as there are no more projects in warning.

WARNING: A terminally deprecated method in java.lang.System has been called

WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/opt/sonarqube/lib/sonar-application-9.9.2.77730.jar)

WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager

WARNING: System::setSecurityManager will be removed in a future release

2023.10.10 14:50:56 INFO ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine

2023.10.10 14:50:56 INFO ce[][o.s.ce.app.CeServer] Compute Engine starting up...

2023.10.10 14:50:57 WARN app[][startup] ####################################################################################################################

2023.10.10 14:50:57 WARN app[][startup] Default Administrator credentials are still being used. Make sure to change the password or deactivate the account.

2023.10.10 14:50:57 WARN app[][startup] ####################################################################################################################

2023.10.10 14:50:57 INFO web[][o.s.s.p.Platform] Web Server is operational

2023.10.10 14:50:57 INFO ce[][o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://127.0.0.1:9092/sonar;NON_KEYWORDS=VALUE

2023.10.10 14:50:57 INFO ce[][c.z.h.HikariDataSource] HikariPool-1 - Starting...

2023.10.10 14:50:57 INFO ce[][c.z.h.p.HikariPool] HikariPool-1 - Added connection conn0: url=jdbc:h2:tcp://127.0.0.1:9092/sonar user=

2023.10.10 14:50:57 INFO ce[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.

2023.10.10 14:50:57 WARN ce[][o.s.db.dialect.H2] H2 database should be used for evaluation purpose only.

2023.10.10 14:50:59 INFO ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube

2023.10.10 14:50:59 INFO ce[][o.s.c.c.CePluginRepository] Load plugins

2023.10.10 14:51:00 INFO ce[][o.s.c.c.ComputeEngineContainerImpl] Running Community edition

2023.10.10 14:51:00 INFO ce[][o.s.ce.app.CeServer] Compute Engine is started

My database string which worked till 9.8 looks like this >>>> jdbc:postgresql://k8svip:postgresport/sonar

Hi,

I guess you missed the part where I said the names changed?

It’s not a question of the value changing, but of the key.

 
HTH,
Ann

Works !!!
Thanks