Upgrade to 26.5: Database connection cannot be established

  • which versions are you using:
    • Community Build: 26.5.0.122743-community
    • Plugins:
      • sonar-checkstyle
      • sonar-cnes-report
      • dependency-check-sonar-plugin
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: upgrade from 26.4 to 26.5
  • what have you tried so far to achieve this
    1. Update values.yaml :white_check_mark:
    2. helm upgrade... :white_check_mark:
    3. SonarQube loads :white_check_mark:
    4. Access “/setup” :white_check_mark:
    5. Press the button
    6. the message Database connection cannot be established. Please check database status and JDBC settings. appears on screen. Unable to retry unless pod is recreated

Additional information

  • JDBC configuration is correct
  • When downgrading (editing values.yaml to the previous version and running helm upgrade), SonarQube works correctly.
  • We use jdbcOverwrite with jdbcUrl, jdbcUsername, jdbcSecretName and jdbcSecretPasswordKey
  • BD: PostgreSQL 16.13
  • Relevant log fragment:
Create JDBC data source for <redacted>
HikariPool-1 - Starting...
HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@<redacted>
HikariPool-1 - Start completed.
...
...
...
Starting DB Migration and container restart
Executing 4 DB migrations...
1/4 #202603000 'Add epss_score, epss_percentile, known_exploited columns to 'sca_vulnerability_issues''...
1/4 #202603000 'Add epss_score, epss_percentile, known_exploited columns to 'sca_vulnerability_issues'': failure | time=16ms
Executed 0/4 DB migrations: failure | time=17ms
DB migration failed | time=31ms
DB migration ended with an exception

Hi,

Can you share your web.log from server startup?

 
Thx,
Ann

Hello, Ann

Please find a fragment below:

log
{"process":"web","timestamp":"2026-05-22T21:33:49.166Z","severity":"INFO","logger":"org.sonar.server.app.WebServer","message":"Web Server stopped"}
{"process":"web","timestamp":"2026-05-22T21:34:21.646Z","severity":"INFO","logger":"org.sonar.process.ProcessEntryPoint","message":"Starting Web Server"}
{"process":"web","timestamp":"2026-05-22T21:34:21.948Z","severity":"INFO","logger":"org.sonar.server.app.TomcatHttpConnectorFactory","message":"Starting Tomcat on port 9000"}
{"process":"web","timestamp":"2026-05-22T21:34:22.748Z","severity":"WARN","logger":"org.apache.catalina.core.StandardHost","message":"appBase on host [localhost] is a parent folder of CATALINA_BASE, which is a bad idea"}
{"process":"web","timestamp":"2026-05-22T21:34:24.048Z","severity":"INFO","logger":"org.sonar.server.platform.LogServerVersion","message":"SonarQube Server / 26.5.0.122743 / 6c0bea236ee407e3f69f450f7985743d629dc209"}
{"process":"web","timestamp":"2026-05-22T21:34:24.139Z","severity":"INFO","logger":"org.sonar.db.DefaultDatabase","message":"Create JDBC data source for jdbc:<redacted>?socketTimeout=1500&sslmode=require"}
{"process":"web","timestamp":"2026-05-22T21:34:24.151Z","severity":"INFO","logger":"com.zaxxer.hikari.HikariDataSource","message":"HikariPool-1 - Starting..."}
{"process":"web","timestamp":"2026-05-22T21:34:24.860Z","severity":"INFO","logger":"com.zaxxer.hikari.pool.HikariPool","message":"HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@3e15bb06"}
{"process":"web","timestamp":"2026-05-22T21:34:24.861Z","severity":"INFO","logger":"com.zaxxer.hikari.HikariDataSource","message":"HikariPool-1 - Start completed."}
{"process":"web","timestamp":"2026-05-22T21:34:27.551Z","severity":"INFO","logger":"org.sonar.server.platform.ServerFileSystemImpl","message":"SonarQube home: /opt/sonarqube"}
{"process":"web","timestamp":"2026-05-22T21:34:27.554Z","severity":"INFO","logger":"org.sonar.server.user.SystemPasscodeImpl","message":"System authentication by passcode is enabled"}
{"process":"web","timestamp":"2026-05-22T21:34:27.943Z","severity":"WARN","logger":"org.sonar.server.platform.DatabaseServerCompatibility","message":"The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarsource.com/sonarqube-community-build/server-upgrade-and-maintenance/upgrade/roadmap/"}
{"process":"web","timestamp":"2026-05-22T21:34:28.233Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy C# Code Quality and Security / 10.25.0.139117 / 8a4301e61a686b966ef8da082b38bbe5f0635810"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Checkstyle / 10.26.1 / "}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Clean as You Code / 2.6.0.3665 / 55c5ecf4a75806328950c2526ed2660a69e5376b"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Dependency-Check / 6.0.0 / 00b6d703c20104d78e384a366f525cc46f27ca8a"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Flex Code Quality and Security / 2.17.0.6043 / 492ed2b0a74e568a2f3e7825f7b5f85fe35042d8"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Go Code Quality and Security / 1.36.0.5922 / 3253cfe744c1f4c7c58137de2a85b8c80e75c222"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy HTML Code Quality and Security / 3.26.0.7600 / 7e68d04255f12d10036c604cf9fb18451a78ae77"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy IaC Code Quality and Security / 2.10.0.20406 / null"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy JaCoCo / 1.5.1.5340 / 5b24d4bddcc7bcd179bfbb9fc1c4e4367e973a91"}
{"process":"web","timestamp":"2026-05-22T21:34:28.234Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Java Advanced Code Quality Analyzer / 8.16.4.1912 / 8d1b73d26c83a998d7af4e4a8f10587654f2e12c"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Java Code Quality and Security / 8.29.0.43460 / b8ca5d7a7ab5502f6313c5cb7ba50ffc3f04bc2a"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy JavaScript/TypeScript/CSS Code Quality and Security / 12.3.0.39932 / e8c5a7c26b02f7674f3c07c92c529adbfca2ee0b"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Kotlin Code Quality and Security / 3.5.0.9240 / 4185728284e7f7f14eae67f52626ba4693fd9d50"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy PHP Code Quality and Security / 3.56.0.15870 / null"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Python Code Quality and Security / 5.21.0.32726 / 8b73cf2650015af864678e1e523a14348856b239"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Ruby Code Quality and Security / 1.22.0.1992 / 0fc5990784a5d40863a40ce21cd4258a0c05e4a1"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Rust Code Quality and Security / 1.5.0.2901 / null"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Scala Code Quality and Security / 1.22.0.2217 / 816418654f8ed9f9328b4063edfc4ce34cdcf16b"}
{"process":"web","timestamp":"2026-05-22T21:34:28.235Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy SonarQube CNES Report / 5.0.2 / null"}
{"process":"web","timestamp":"2026-05-22T21:34:28.236Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy Text Code Quality and Security / 2.43.0.11106 / null"}
{"process":"web","timestamp":"2026-05-22T21:34:28.236Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy VB.NET Code Quality and Security / 10.25.0.139117 / 8a4301e61a686b966ef8da082b38bbe5f0635810"}
{"process":"web","timestamp":"2026-05-22T21:34:28.236Z","severity":"INFO","logger":"org.sonar.server.plugins.ServerPluginManager","message":"Deploy XML Code Quality and Security / 2.16.0.7616 / 3a1ad4a42cbdde65f7943b28e4ff3b86a2033f50"}
{"process":"web","timestamp":"2026-05-22T21:34:31.744Z","severity":"INFO","logger":"org.sonar.server.platform.db.migration.charset.PostgresCharsetHandler","message":"Verify that database charset supports UTF8"}
{"process":"web","timestamp":"2026-05-22T21:34:32.038Z","severity":"INFO","logger":"org.sonar.server.es.EsClientProvider","message":"Connected to local Elasticsearch: [http://localhost:9001]"}
{"process":"web","timestamp":"2026-05-22T21:34:32.746Z","severity":"INFO","logger":"org.sonar.server.platform.Platform","message":"Database needs to be migrated. Please refer to https://docs.sonarsource.com/sonarqube-community-build/server-upgrade-and-maintenance/upgrade/roadmap/"}
{"process":"web","timestamp":"2026-05-22T21:34:32.824Z","severity":"INFO","logger":"org.sonar.server.platform.web.MasterServletFilter","message":"Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@247bbfba [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]"}
{"process":"web","timestamp":"2026-05-22T21:34:32.825Z","severity":"INFO","logger":"org.sonar.server.platform.web.MasterServletFilter","message":"Initializing servlet filter org.sonar.server.platform.web.NoCacheFilter@59fea5f5 [pattern=UrlPattern{inclusions=[/api/v2/*], exclusions=[]}]"}
{"process":"web","timestamp":"2026-05-22T21:34:35.036Z","severity":"INFO","logger":"org.hibernate.validator.internal.util.Version","message":"HV000001: Hibernate Validator 9.1.0.Final"}
{"process":"web","ENTRYPOINT":"/api/v2/analysis/version","timestamp":"2026-05-22T21:35:19.856Z","severity":"WARN","logger":"org.springframework.web.servlet.PageNotFound","message":"No mapping for GET /api/v2/analysis/version"}
{"process":"web","ENTRYPOINT":"/api/v2/analysis/version","timestamp":"2026-05-22T21:35:19.861Z","severity":"ERROR","logger":"org.sonar.server.v2.common.RestResponseEntityExceptionHandler","message":"Resource not found.","stacktrace":["org.springframework.web.servlet.NoHandlerFoundException: No endpoint GET /api/v2/analysis/version.",
	"at org.springframework.web.servlet.DispatcherServlet.noHandlerFound(DispatcherServlet.java:1177)",
	"at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:953)",
	"at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:866)",
	"at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1000)",
	"at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:892)",
	"at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:622)",
	"at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:874)",
	"at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:710)",
	"at org.sonar.server.platform.web.ApiV2Servlet.service(ApiV2Servlet.java:114)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:128)",
	"at org.sonar.server.platform.web.ConditionalSpringSecurityFilter.doFilter(ConditionalSpringSecurityFilter.java:74)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.WebPagesFilter.doFilter(WebPagesFilter.java:80)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:167)",
	"at org.sonar.server.platform.web.MasterServletFilter$HttpFilterChainAdapter.doFilter(MasterServletFilter.java:208)",
	"at org.sonar.server.platform.web.NoCacheFilter.doFilter(NoCacheFilter.java:34)",
	"at org.sonar.server.platform.web.MasterServletFilter$JavaxFilterAdapter.doFilter(MasterServletFilter.java:194)",
	"at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:165)",
	"at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:126)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:83)",
	"at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:70)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.CspFilter.doFilter(CspFilter.java:67)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:60)",
	"at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:47)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:56)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.EndpointPathFilter.doFilter(EndpointPathFilter.java:47)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:61)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:65)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:115)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.springframework.web.filter.UrlHandlerFilter.doFilterInternal(UrlHandlerFilter.java:98)",
	"at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)",
	"at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:107)",
	"at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:165)",
	"at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:77)",
	"at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)",
	"at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:113)",
	"at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:294)",
	"at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:83)",
	"at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:72)",
	"at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)",
	"at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)",
	"at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)",
	"at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)",
	"at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1779)",
	"at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)",
	"at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:946)",
	"at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:480)",
	"at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:57)",
	"at java.base/java.lang.Thread.run(Thread.java:1474)"]}
{"process":"web","timestamp":"2026-05-22T21:39:10.141Z","severity":"INFO","logger":"org.sonar.server.platform.db.migration.DatabaseMigrationImpl","message":"Starting DB Migration and container restart"}
{"process":"web","timestamp":"2026-05-22T21:39:10.152Z","severity":"INFO","logger":"DbMigrations","message":"Executing 4 DB migrations..."}
{"process":"web","timestamp":"2026-05-22T21:39:10.153Z","severity":"INFO","logger":"DbMigrations","message":"1/4 #202603000 'Add epss_score, epss_percentile, known_exploited columns to 'sca_vulnerability_issues''..."}
{"process":"web","timestamp":"2026-05-22T21:39:10.168Z","severity":"ERROR","logger":"DbMigrations","message":"1/4 #202603000 'Add epss_score, epss_percentile, known_exploited columns to 'sca_vulnerability_issues'': failure | time=14ms"}
{"process":"web","timestamp":"2026-05-22T21:39:10.168Z","severity":"ERROR","logger":"DbMigrations","message":"Executed 0/4 DB migrations: failure | time=16ms"}
{"process":"web","timestamp":"2026-05-22T21:39:10.170Z","severity":"ERROR","logger":"org.sonar.server.platform.db.migration.DatabaseMigrationImpl","message":"DB migration failed | time=29ms"}
{"process":"web","timestamp":"2026-05-22T21:39:10.170Z","severity":"ERROR","logger":"org.sonar.server.platform.db.migration.DatabaseMigrationImpl","message":"DB migration ended with an exception","stacktrace":["org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #202603000 'Add epss_score, epss_percentile, known_exploited columns to 'sca_vulnerability_issues'' failed",
	"at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:105)",
	"at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:89)",
	"at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:66)",
	"at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:55)",
	"at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:106)",
	"at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:81)",
	"at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)",
	"at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)",
	"at java.base/java.lang.Thread.run(Thread.java:1474)","\tCaused by: ","\tjava.lang.IllegalStateException: Fail to execute ALTER TABLE sca_vulnerability_issues ADD COLUMN epss_score NUMERIC NULL, ADD COLUMN epss_percentile NUMERIC NULL, ADD COLUMN known_exploited BOOLEAN NULL","\tat org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:106)","\tat org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:86)","\tat org.sonar.server.platform.db.migration.version.v202603.AddEpssColumnsToScaVulnerabilityIssues.execute(AddEpssColumnsToScaVulnerabilityIssues.java:48)","\tat org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45)","\tat org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:101)","\t... 8 common frames omitted","\t\tCaused by: ","\t\torg.postgresql.util.PSQLException: ERROR: must be owner of table sca_vulnerability_issues","\t\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2904)","\t\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2589)","\t\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:431)","\t\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:534)","\t\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:437)","\t\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:359)","\t\tat org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:344)","\t\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:320)","\t\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:315)","\t\tat com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)","\t\tat com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)","\t\tat org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:91)","\t\t... 12 common frames omitted"]}

Hi,

It looks to me like the connection to the DB got interrupted. If it couldn’t be established in the first place, you wouldn’t have gotten as far as

 
Ann

Yes, it’s weird. I agree with you that the app successfully connected to the BD because of that msg (it needs to connect to the DB to identify that a DB migration is necessary).

The issue is that the interruption is a “consistent intermittence”. It always happen at the same step, and for the same version.

It happens each time after trying the upgrade and also after restarting/recreating the pod.
I’ve tested on different days and different times.

When downgrading to 26.4, it works fine

I just double checked the log and found this

Caused by: ","\t\torg.postgresql.util.PSQLException: ERROR: must be owner of table sca_vulnerability_issues"

It might be related to some work (DB migration) done a few weeks/month ago on our side. I’ll talk with our DBA and come back to you (sorry for the inconvenience).

Quick question:

I guess that the connection user must be the owner of the tables, right? Is this expected for regular use or only for the migration? I didn’t see anything related in the docs.

Yes, updating the owner solve the issue. Thanks and sorry for the inconvenience.

Hi,

Yes, the SonarQube user needs to have full rights on its schema. Day-to-day, it’s just about normal CRUD, but at update there are schema-level change to be made.

 
HTH,
Ann