Upgraded SonarQube 9.9.0 to 10.1 and some projects are not visible

Good morning,
I attempted an upgrade of our SonarQube from version 9.9.0 to 10.1, Upgrade went well but I noticed that some projects are failing. One project is visible and the other project is not visible or greyed out.
I have reviewed all the logs and nothing specific showing coming up there. Sonar service and Elastic search service started clean. I have also re-index sonar by deleting the directory /data/es8 and restarted sonar but the issue persists.

I need help resolving this issue

Hi,

Welcome to the community!

It sounds like reindexing was still taking place when you saw this. Does it continue to be a problem?

 
Ann

Yes, it’s still a problem. I waited for the re-indexing to complete for more than 24 hours and nothing changes. I see from the community that this is a common problem that people have with upgrading sonarqube.

Hi,

How big is your instance? And when you see projects greyed-out? Is that in the projects list? The project homepage? Because I believe they greying is an indicator that indexing hasn’t gotten to that project yet. But I believe you can still analyze.

 
Ann

Our instance is an AWS EC2 t3.large. We have 2 projects and one is greyed out and the other is not. I believe for the second project to be showing properly, then the indexing has completed. The issue we are facing now is the 1st project is greyed out. As at today, I am seeing this error on the Sonar Console:

SonarQube completed the reload of project data. Some tasks failed or cancelled causing some projects to remain unavailable.

is there a command that can show the status of the projects that has completed or not? I can see it manually on the console though. See attached images



Hi,

Thanks for the details. I’ve flagged this for more expert eyes.

 
Ann

Hi @Oluyomi_Sunmonu,

Could you try to click on the “wheel” icon to see whether the cancelled ce tasks have warnings or error attached, and if yes, copy-paste the errors here?

Thanks,
Aurélien

When I click on that, it only display this content and I am unable to snapshot it for you:

Filter by Component “nitaac-neos-j22-spring”
nitaac-neos-j22-spring- Is the name of the failed project

There is no warning or errors

Thanks for the reply.

When you say: “I have reviewed all the logs”, does it include Compute Engine logs?

If not, could you please check them? If yes, could set the debug mode and re-trigger an indexation and see whether you see some problems in the Compute Engine logs?

The below is what I found in most the ce.logs

2023.08.16 21:16:42 INFO ce[o.s.p.ProcessEntryPoint] Starting Compute Engine
2023.08.16 21:16:42 INFO ce[o.s.ce.app.CeServer] Compute Engine starting up…
2023.08.16 21:16:43 INFO ce[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.us-east-1.rds.amazonaws.com:5432/sonar
2023.08.16 21:16:43 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Starting…
2023.08.16 21:16:44 INFO ce[c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@40babb4
2023.08.16 21:16:44 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.08.16 21:16:46 INFO ce[o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube-9.9.0.65466
2023.08.16 21:16:46 INFO ce[o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.08.16 21:16:47 INFO ce[o.s.c.c.CePluginRepository] Load plugins
2023.08.16 21:16:49 INFO ce[o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.08.16 21:16:49 INFO ce[o.s.ce.app.CeServer] Compute Engine is started
2023.08.16 21:18:39 INFO ce[o.s.p.ProcessEntryPoint] Gracefully stopping process
2023.08.16 21:18:39 INFO ce[o.s.ce.app.CeServer] Compute Engine is stopping…
2023.08.16 21:18:39 INFO ce[o.s.c.t.CeProcessingSchedulerImpl] Gracefully stopping workers…
2023.08.16 21:18:39 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated…
2023.08.16 21:18:39 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2023.08.16 21:18:39 INFO ce[o.s.ce.app.CeServer] Compute Engine is stopped

Please can you supply me with the steps to switch to debug mode? I know how to re-index sonar

This is described here.

Now, looking at your CE logs I have one question: is it you that shut down SonarQube 2 minutes after it started? or did it shut down on its own?

No, It wasn’t the one. I think it’s starting and stopping.

Then please make sure to share all logs; something is preventing sonarqube to start-up correctly.

logs (1).zip (750.0 KB)
See attached logs

Something is killing your SonarQube shortly after it starts:

2023.08.16 21:16:49 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping SonarQube

If it’s not you, it might be triggered by another process on your system.

The SonarQube console is accessible with only one project appearing to be functional. I am not sure what you meant by saying something is shutting down SonarQube. Maybe you meant to say SonarQube is not fully operational or started successfully. I am not sure of what to do to make this project functional and I am afraid of re-indexing SonarQube again because the only one project that appears to be OK may go down like the other one now.

From your logs it appears clearly that few minutes after starting up, SonarQube shuts down:

2023.08.16 21:16:49 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping SonarQube

You told me it wasn’t you who shut it down. At the same time I don’t see any errors in your logs that could indicate that SonarQube decided by itself to shut down. So my guess is that something in your environment is preventing SonarQube to remain up.

Irrespective of whatever is in this log, SonarQube UI is accessible and sonarqube service is started and not stopped. So I’m confused because we are stuck and can’t upgrade our sonarqube at the moment.

Logs are pretty clear:

2023.08.16 21:16:49 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping SonarQube
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Sonarqube has been requested to stop
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping [Compute Engine] process...
2023.08.16 21:18:39 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [Compute Engine]: 143
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Process[Compute Engine] is stopped
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping [Web Server] process...
2023.08.16 21:18:39 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.08.16 21:18:39 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [Web Server]: 143
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.08.16 21:18:39 INFO  app[][o.s.a.SchedulerImpl] Stopping [ElasticSearch] process...

What I can suggest is:

  1. make sure to stop SonarQube
  2. start sonarQube and note down the time
  3. wait 15 minutes
  4. send me the full log again (we must not see SonarQube going down during that period)

I have performed the steps you provided and attached the logs with this for your review, I will go ahead and review the logs myself
logs (1).zip (750.0 KB)