Unable to load projects after upgrading to 9.9LTS from 8.9LTS

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Upgrading to 9.9LTS from 8.9LTS
  • how is SonarQube deployed: zip, Docker, Helm -.zip
  • what are you trying to achieve - upgrade sonarqube to latest lts
  • what have you tried so far to achieve this - sonar web is up and operational

Projects are not loading post upgrade.

I have followed suggested from other posts
stop sonarqube → remove /opt/sonarqube/data/es7 —> start sonarqube

still the issue persists.

Kindly assist

Thanks!
Dev
eslogs.txt (8.5 KB)
weblogs.txt (16.6 KB)

Hi Dev,

Welcome to the community!

I have a few questions for you:

  • First, is this still the case?
  • Has the main branch of these projects been analyzed?
  • When you click through on one of these projects, what do you see?

It may be that what you’re seeing is about progressive availability: the server comes up and is available before all the indices have been rebuilt. As each project is indexed, its values become available in the UI (you may need to reload the page).

 
Ann

Thanks Ann for the response.

  • First, is this still the case? - Yes its still an issue
  • Has the main branch of these projects been analyzed? - They are empty projects created in lower environment for testing. The project similar empty project created post upgrade loads fine but the ones present before fails to load
  • When you click through on one of these projects, what do you see? Unable to click from projects page as its disabled (only project that is enabled is the one created post upgrade)

I can select remaining projects via background tasks as below


which shows below page

Regards!
Dev

Hi,

Those background tasks show up as CANCELLED. Any idea how that happened?

 
Ann

Hello, Not sure and nothing in the logs as well.
both web.log and es.log looks clean and no errors seen.

Thanks!
Dev

Hi,

What’s in the ce.log?

 
Ann

Hello,
ComputeEngine logs also has no errors. Below is the logs from CE for multiple restarts.

2023.02.23 18:11:28 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.02.23 18:11:29 INFO  ce[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@2049d9f0
2023.02.23 18:11:29 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.02.23 18:11:30 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.02.23 18:11:30 INFO  ce[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.02.23 18:11:30 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
2023.02.23 18:11:31 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.02.23 18:11:31 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started
2023.02.23 18:11:33 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=test-repo2 | type=ISSUE_SYNC | branch=master | branchType=BRANCH | id=AYZ_eRP2TWaPitmAr-HB
2023.02.23 18:11:33 INFO  ce[AYZ_eRP2TWaPitmAr-HB][o.s.c.t.s.ComputationStepExecutor] Ignore orphan component | status=SUCCESS | time=3ms
2023.02.23 18:11:33 INFO  ce[AYZ_eRP2TWaPitmAr-HB][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost.localdomain:9001]
2023.02.23 18:11:34 INFO  ce[AYZ_eRP2TWaPitmAr-HB][o.s.c.t.p.t.IndexIssuesStep] indexing issues of branch AYZzHDMyoFHiPvhD8m8p
2023.02.23 18:11:34 INFO  ce[AYZ_eRP2TWaPitmAr-HB][o.s.c.t.s.ComputationStepExecutor] index issues | status=SUCCESS | time=190ms
2023.02.23 18:11:34 INFO  ce[AYZ_eRP2TWaPitmAr-HB][o.s.c.t.CeWorkerImpl] Executed task | project=test-repo2 | type=ISSUE_SYNC | branch=master | branchType=BRANCH | id=AYZ_eRP2TWaPitmAr-HB | status=SUCCESS | time=573ms
2023.02.23 19:25:15 INFO  ce[][o.s.p.ProcessEntryPoint] Gracefully stopping process
2023.02.23 19:25:15 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopping...
2023.02.23 19:25:15 INFO  ce[][o.s.c.t.CeProcessingSchedulerImpl] Gracefully stopping workers...
2023.02.23 19:25:15 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2023.02.23 19:25:15 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2023.02.23 19:25:15 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopped
2023.02.23 19:25:33 INFO  ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine
2023.02.23 19:25:33 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...
2023.02.23 19:25:33 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://db-106603-0000ie-dev-sonar.cytgpjvgotps.eu-west-1.rds.amazonaws.com/sonar
2023.02.23 19:25:33 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.02.23 19:25:34 INFO  ce[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@2049d9f0
2023.02.23 19:25:34 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.02.23 19:25:35 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.02.23 19:25:35 INFO  ce[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.02.23 19:25:35 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
2023.02.23 19:25:36 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.02.23 19:25:36 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started

Hi,

Are there logs for those canceled tasks? You would find them under the row’s cog menu.

 
Ann

Hello, I could not find anything related to cancelled project data reload.

Thanks
Dev

Hi Dev,

Thanks for checking.

Going back over the whole thread, the projects were empty before upgrade.

So how critical is this for you? Why not just delete them and move on?

 
Ann

hello, definitly not critical ones as they were only created for testing.
and this is our first testing environment where we tested our upgrade!
I wanted to make sure this is not an issue with the upgrade.
Anyways i am working on upgrading other test environment in which i will be onboarding few projects with data and assigned with custom quality gates and have them scanned before upgrading. If the similer issue seen in next environment we have to look further.

I would update you tomorrow on how it goes, hope that is fine!

Thanks for assisting with this!
Dev

1 Like

Hello Ann,

Could you also confirm on the below please,
Current version of our sonar is - Developer Edition Version 8.9.6 (build 50800).
Is it okay to upgrade to 9.9 LTS or do we need to upgrade to 8.9.10 LTS and to 9.9 LTS.

I have come across below from sonarqube docs:

If you're migrating from an earlier patch version of an LTS, you can upgrade directly to the next LTS. You don't need to install any intermediate patch versions.

Does this mean we can upgrade from 8.9.6 to 9.9 LTS? Please confirm

Regards!
Dev

Hi Dev,

Yes, that’s exactly what that means.

 
HTH,
Ann

1 Like

Thanks Ann,

I have onboarded/scanned few projects (java/python/go/scala and more) on test environment. and I upgraded to 9.9 LTS (using community edition for testing as suggested by Sonar when requested for trial license key as Developer edition is not entitled for trial license)

I have run sonar scan on java projects post upgrade and we observe the first scanning reports are not published/posted to the server. There is not error see in the CE.log as well as web.log.

So the below logs from jenkins provides the status of sonar scan report status.

INFO org.sonarsource.scanner.maven.SonarQubeMojo - More about the report processing at https://sonar-server/api/ce/task?id=AYaTa7vyA3NwpgXvv98i

{"task":{"id":"AYaTZaa0A3NwpgXvv98h","type":"REPORT","componentId":"AYaPI6muAUNCV3JT-X-h","componentKey":"<component key>","componentName":"test-service","componentQualifier":"TRK","status":"PENDING","submittedAt":"2023-02-27T15:02:38+0000","submitterLogin":"testBB","startedAt":"2023-02-27T15:02:39+0000","executionTimeMs":31744,"warnings":[]}}
{"task":{"id":"AYaTZaa0A3NwpgXvv98h","type":"REPORT","componentId":"AYaPI6muAUNCV3JT-X-h","componentKey":"component key here","componentName":"test-service","componentQualifier":"TRK","status":"CANCELED","submittedAt":"2023-02-27T15:02:38+0000","submitterLogin":"testBB","startedAt":"2023-02-27T15:02:39+0000","executedAt":"2023-02-27T15:04:01+0000","executionTimeMs":82139,"hasScannerContext":false,"warningCount":0,"warnings":[]}}

Next Run(2nd) which is success

{"task":{"id":"AYaTa7vyA3NwpgXvv98i","type":"REPORT","componentId":"AYaPI6muAUNCV3JT-X-h","componentKey":"component key here","componentName":"test-service","componentQualifier":"TRK","analysisId":"AYaTa7wjIi-5djc7Htjq","status":"SUCCESS","submittedAt":"2023-02-27T15:09:16+0000","submitterLogin":"testBB","startedAt":"2023-02-27T15:09:16+0000","executedAt":"2023-02-27T15:09:17+0000","executionTimeMs":1088,"hasScannerContext":true,"warningCount":0,"warnings":[]}}```

Could you please help with this?

Regards!
Dev

Hi,

It looks like the first request was made a little early:

Then someone cancelled the back-end processing of the analysis:

But your second run was allowed to run to success:

It’s not clear to me what you need help with.

 
Ann

1 Like

Also,
I could see the difference in # of bugs and Code Smells on the same code post upgrade.

Before upgrade

Post upgrade

is this expected!
(this is seen for other fields as well on different projects.)

kindly confirm.

Thanks!
Dev

kindly disregard this as scanning looks fine for all the projects which i have scanned now!
that loosk to be an intermittent and will bring this up if seen again and reported in logs!

Hello, could you please confirm on this behaviour !

Thanks!
Dev

Hi Dev,

Confirm what behavior? The last I have is:

If this is about something else, then I need to ask you to create a new thread.

 
Thx,
Ann

Thanks Ann,

I have replied to specific post, kindly see the below image.

let me know if you need me to initiate new thread!

Regards!
Dev