Sonarqube Developer Edition didnt connect to PGSQL 13

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube Developer Edition - 9.9.4 (sonarqube-developer-9.9.4.87374.zip)
  • how is SonarQube deployed: zip, Docker, Helm
    zip
  • what are you trying to achieve
    Upgrade Sonarqube Developer from 8.9.9 to 9.9.4
  • what have you tried so far to achieve this
    Updated JDK Path to openjdk17
    Changed DB config to point to PGSQL 13, which was working db of 8.9.9 version of sonar.

In Logs,
Forcing to update the DB.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

In the logs observed:

2024.03.04 12:25:21 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/local/jdk-17/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-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=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.4.87374.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process8917491118124184796properties
2024.03.04 12:25:27 WARN  app[][startup] ################################################################################
2024.03.04 12:25:27 WARN  app[][startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
2024.03.04 12:25:27 WARN  app[][startup] ################################################################################

Hi,

What did you make of this?

 
Ann

Hi Ann,
All the version of 9.6, 9,8 and even 9.9 whenever tries to use the existing Postgresql DB facing the warning message as
2024.03.06 11:54:58 DEBUG app[o.s.a.p.ManagedProcessLifecycle] EventWatcher[ElasticSearch] tryToMoveTo Web Server from STARTING to STARTED => true
2024.03.06 11:55:04 WARN app[startup] ################################################################################
2024.03.06 11:55:04 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
2024.03.06 11:55:04 WARN app[startup] ################################################################################
^C

Tried with 9.8:
AWS RDS - Aurora Postgresql 15.5
OpenJDK 11
Still the behavious is same.
Embedded H2 DB is working whereas the external DB not able to connect.
JDBC URL used:
sonar.jdbc.url=jdbc:postgresql://dc-sonarqubedev-nonprod-1-db.cluster-bfdtrtwermjl.ap-southeast-1.rds.amazonaws.com:3306/sonarqubedev?currentSchema=sonardb1&useSSL=true&trustServerCertificate=true

In the web.log,
web.log:2024.03.06 11:55:13 ERROR web[o.a.c.c.C.[.[.[/]] Servlet [jsp] in web application threw load() exception
web.log:2024.03.06 11:55:14 ERROR web[o.a.c.c.C.[.[.[/deploy]] Servlet [jsp] in web application [/deploy] threw load() exception

web.log:2024.03.06 11:55:12 TRACE web[sql] time=4ms | sql=select version from schema_migrations
web.log:2024.03.06 11:55:13 TRACE web[sql] time=6ms | sql=select version from schema_migrations

Anything is missing in this setup kindly let me know.

Thanks

Hi,

What does this mean to you?

 
Ann

1 Like