Upgrade 9.9.8 to 2025.1. Can't upgrade DB, button doesn't work

Hi all,

  • I’m using SonarQube Community Edition v9.9.8.
  • SonarQube is deployed from the zip
  • I’m trying to upgrade 9.9.8 to 2025.1
  • I’ve installed and started SonarQube 2025.1 Community Build (sonarqube-25.1.0.102122.zip). Then I opened SQ URL in the browser to upgrade database but when I’m pressing “Start upgrade” button nothing is happening. I tried different browsers, tried to access with and without reverse-proxy, nothing helped so far. What can be the issue and how to fix it?

You can see the relevant piece from the access.log file below. I suspect there shouldn’t be an undefined in the POST - “/undefined/api/system/migrate_db”, or I’m wrong?

xxx.xx.xxx.x - - [28/Jan/2025:16:04:31 +0100] "GET /api/v2/system/migrations-status HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
- - - [28/Jan/2025:16:04:31 +0100] "GET /api/v2/system/migrations-status HTTP/1.1" 200 - "http://appserver:8080/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
- - - [28/Jan/2025:16:04:33 +0100] "POST /undefined/api/system/migrate_db HTTP/1.1" 200 - "http://appserver:8080/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
- - - [28/Jan/2025:16:04:36 +0100] "GET /api/v2/system/migrations-status HTTP/1.1" 200 - "http://appserver:8080/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xxx.x - - [28/Jan/2025:16:04:37 +0100] "GET /api/v2/system/migrations-status HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

Hi,

What do your server logs say?

 
Ann

Which logs? Your link is 404.

Hi,

Thanks for letting me know.

 
Ann

Hi Ann,
There is the last records from the log files.

sonar.log

2025.01.28 15:35:12 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2025.01.28 15:35:12 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [X:\XXXX\sonarqube-25.1.0.102122]: X:\XXXX\JDK\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=x:\xxxx\SonarHome\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 -server -Xmx768m -Xms256m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-25.1.0.102122.jar;X:\XXXX\sonarqube-25.1.0.102122\lib\jdbc\mssql\mssql-jdbc-11.2.2.jre17.jar org.sonar.server.app.WebServer x:\xxxx\SonarHome\temp\sq-process16258872114616849532properties
2025.01.28 15:35:16 WARN  app[][startup] ################################################################################
2025.01.28 15:35:16 WARN  app[][startup] 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/upgrade-the-server/roadmap
2025.01.28 15:35:16 WARN  app[][startup] ################################################################################

web.log

2025.01.28 15:35:21 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://127.0.0.1:9001]
2025.01.28 15:35:22 INFO  web[][o.s.s.p.Platform] Database needs to be migrated. Please refer to https://docs.sonarsource.com/sonarqube-community-build/server-upgrade-and-maintenance/upgrade/upgrade-the-server/roadmap
2025.01.28 15:35:22 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@35e2b89f [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2025.01.28 15:35:24 INFO  web[][o.h.v.i.util.Version] HV000001: Hibernate Validator null

es.log

2025.01.28 15:35:11 INFO  es[][o.e.l.ClusterStateLicenseService] license [f2eec4ee-4c3d-417e-b60d-371dfbeb5f12] mode [basic] - valid
2025.01.28 15:35:11 INFO  es[][o.e.c.f.AbstractFileWatchingService] starting file watcher ...
2025.01.28 15:35:11 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2025.01.28 15:35:11 INFO  es[][o.e.c.f.AbstractFileWatchingService] file settings service up and running [tid=39]
2025.01.28 15:35:12 INFO  es[][o.e.r.s.FileSettingsService] setting file [x:\xxxx\SonarHome\temp\conf\es\operator\settings.json] not found, initializing [file_settings] as empty
2025.01.28 15:35:12 INFO  es[][o.e.h.n.s.HealthNodeTaskExecutor] Node [{sonarqube}{aJ9BVlGcRz-xzENxKF3-Ig}] is selected as the current health node.

access.log

xxx.xx.xx.xx - - [29/Jan/2025:10:17:09 +0100] "GET /setup HTTP/1.0" 200 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:09 +0100] "GET /undefined/api/l10n/index?locale=en-US HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:09 +0100] "GET /api/v2/system/migrations-status HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:11 +0100] "POST /undefined/api/system/migrate_db HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:12 +0100] "POST /undefined/api/system/migrate_db HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:13 +0100] "POST /undefined/api/system/migrate_db HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
xxx.xx.xx.xx - - [29/Jan/2025:10:17:14 +0100] "GET /api/v2/system/migrations-status HTTP/1.0" 200 - "https://server.domain.com/setup" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

Hi,

And what happens when you click the upgrade button?

What, if anything shows up in the server logs? What, if anything, shows up in your browser console?

 
Thx,
Ann

Nothing happens when I click the upgrade button. Nothing at all.
Of all server logs new records appear in access.log only, which I already shared in previous reply.
In browser console I see a single message -

Unexpected status code: undefined
Rp.console.error @ index.js:6726

Hi,

What browser are you using? And can you try a different one?

 
Thx,
Ann

I understand it’s a community thread and you don’t have any obligations but at least try to read my initial post.

Hi,

Okay, so you’ve tried different browsers. Did you see the same console error in each of them?

 
Ann

Yes, the same. I’ll try to reinstall Sonar to check if there will be any difference.

Hi,

No need to reinstall. Just try hitting api/system/migrate_db directly.

 
HTH,
Ann

Hi Ann,
Running curl -X POST https://server.domain.com/api/system/migrate_db is helped to upgrade database, but isn’t helped to get SonarQube in working condition.

  1. When I open URL https://server.domain.com/setup I see “Database is up-to-date”.
  2. When I open URL https://server.domain.com/ I’m getting redirected to https://server.domain.com/maintenance?return_to=%2F and on the screen I see “undefined is offline. The connection to SonarQube is lost. Please contact your system administrator.”.

Logs:
web.log

2025.01.31 10:46:06 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.saml.ws.ValidationAction@7d6393cd [pattern=UrlPattern{inclusions=[/saml/validation], exclusions=[]}]
2025.01.31 10:46:06 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.user.ws.ChangePasswordAction@47bb9d73 [pattern=UrlPattern{inclusions=[/api/users/change_password], exclusions=[]}]
2025.01.31 10:46:06 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.plugins.PluginsRiskConsentFilter@5bce75f [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
2025.01.31 10:46:06 INFO  web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition
2025.01.31 10:46:07 INFO  web[][o.s.s.p.Platform] Web Server is operational

es.log

2025.01.31 10:45:53 INFO  es[][o.e.l.ClusterStateLicenseService] license [f2eec4ee-4c3d-417e-b60d-371dfbeb5f12] mode [basic] - valid
2025.01.31 10:45:53 INFO  es[][o.e.c.f.AbstractFileWatchingService] starting file watcher ...
2025.01.31 10:45:53 INFO  es[][o.e.g.GatewayService] recovered [6] indices into cluster_state
2025.01.31 10:45:53 INFO  es[][o.e.c.f.AbstractFileWatchingService] file settings service up and running [tid=39]
2025.01.31 10:45:53 INFO  es[][o.e.r.s.FileSettingsService] setting file [c:\path\SonarHome\temp\conf\es\operator\settings.json] not found, initializing [file_settings] as empty
2025.01.31 10:45:53 INFO  es[][o.e.h.n.s.HealthNodeTaskExecutor] Node [{sonarqube}{aJ9BVlGcRz-xzENxKF3-Ig}] is selected as the current health node.
2025.01.31 10:45:54 INFO  es[][o.e.c.r.a.AllocationService] current.health="GREEN" message="Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]]])." previous.health="RED" reason="shards started [[metadatas][0]]"

ce.log

2025.01.31 10:46:50 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=GFE | type=ISSUE_SYNC | branch=master | branchType=BRANCH | id=56b254f3-9069-4ed2-9b1e-b3dc2f706aaa
2025.01.31 10:46:50 INFO  ce[56b254f3-9069-4ed2-9b1e-b3dc2f706aaa][o.s.c.t.s.ComputationStepExecutor] Ignore orphan component | status=SUCCESS | time=9ms
2025.01.31 10:46:50 INFO  ce[56b254f3-9069-4ed2-9b1e-b3dc2f706aaa][o.s.c.t.p.t.IndexIssuesStep] indexing issues of branch AYLGZmR5cpQZi88PFSx5
2025.01.31 10:46:50 INFO  ce[56b254f3-9069-4ed2-9b1e-b3dc2f706aaa][o.s.c.t.s.ComputationStepExecutor] index issues | status=SUCCESS | time=27ms
2025.01.31 10:46:50 INFO  ce[56b254f3-9069-4ed2-9b1e-b3dc2f706aaa][o.s.c.t.CeWorkerImpl] Executed task | project=GFE | type=ISSUE_SYNC | branch=master | branchType=BRANCH | id=56b254f3-9069-4ed2-9b1e-b3dc2f706aaa | status=SUCCESS | time=67ms

sonar.log

2025.01.31 10:46:07 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
2025.01.31 10:46:07 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[COMPUTE_ENGINE] from [C:\path\sonarqube-25.1.0.102122]: C:\path\JDK\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=c:\path\SonarHome\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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-25.1.0.102122.jar;C:\path\sonarqube-25.1.0.102122\lib\jdbc\mssql\mssql-jdbc-12.8.1.jre11.jar org.sonar.ce.app.CeServer c:\path\SonarHome\temp\sq-process9436399417092576535properties
2025.01.31 10:46:11 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
2025.01.31 10:46:11 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational

access.log

xxx.xx.xx.xx - - [31/Jan/2025:10:57:05 +0100] "GET /maintenance/undefined/undefined/api/l10n/index?locale=en-US HTTP/1.0" 200 - "https://server.domen.com/maintenance/undefined/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "1ac26099-4c03-405b-b7e9-5a88cf212dfa"
xxx.xx.xx.xx - - [31/Jan/2025:10:57:05 +0100] "GET /undefined/api/system/status HTTP/1.0" 200 - "https://server.domen.com/maintenance?return_to=%2Fmaintenance%2Fundefined%2F" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "e0d016cf-8c52-42a6-ba94-4e5d2c52a66c"
xxx.xx.xx.xx - - [31/Jan/2025:10:57:06 +0100] "GET /maintenance/undefined/ HTTP/1.0" 200 - "https://server.domen.com/maintenance?return_to=%2Fmaintenance%2Fundefined%2F" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "e5bcce5b-a631-4299-a312-5f853a700c50"
xxx.xx.xx.xx - - [31/Jan/2025:10:57:06 +0100] "GET /maintenance/undefined/undefined/api/l10n/index?locale=en-US HTTP/1.0" 200 - "https://server.domen.com/maintenance/undefined/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "e1b530ab-3939-4506-860c-b481159279dc"
xxx.xx.xx.xx - - [31/Jan/2025:10:57:06 +0100] "GET /undefined/api/system/status HTTP/1.0" 200 - "https://server.domen.com/maintenance?return_to=%2Fmaintenance%2Fundefined%2F" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "b05d58f3-f912-4f57-9bfd-5cb045e29938"

I think the reson for the issues is /undefined/ in the URL path. We haven’t had it before upgrade, it’s appeared only in the new version.

Hi,

What sits on the network between you and the server?

And what configurations did you change with the upgrade? Are you using a web context?

 
Ann

I have double-checked our customizations, and it turns out that the issue is caused by the custom footer in the web/index.html file. Thank you for your help.

1 Like