I am unable to see the number of projects accurately in projects home page. Where as I have tried to remove the “$SONARQUBE-HOME/data/es7” , and restarted the server. Although I can see the project count is accurate, but after few days again we are facing same issue, the projects are not showing accurately.
For few days I can see correct number of projects in Sonarqube after clearing the data inside $Sonarqube_home/data/es7. Later after few days automatically those number of projects are not matching.
There is no any “ERROR/WARN” in web.log files. But I can see below error in ce.log file.
Can you please check why our projects count is showing less. This issue is happening after a week, later after cleaning <Sonarqube_Home/data/es7>.
2023.11.05 16:15:12 WARN ce[][c.z.h.pool.PoolBase] HikariPool-1 - Failed to validate connection org.postgresql.jdbc.PgConnection@62874a50 (This connection has been closed.). Possibly consider using a shorter maxLifetime value.
ERROR ce[AYuVK66wRd8omc2taC1m][o.s.c.t.CeWorkerImpl] Failed to finalize task with uuid 'AYuVK66wRd8omc2taC1m' and persist its state to dbjava.lang.IllegalStateException: Task does not exist anymore: CeTask{type=REPORT, uuid=AYuVK66wRd8omc2taC1m, component=Component{uuid='AYs4Y79oABJ996dhnqkY', key='CCT_awcp-mkn-build', name='CCT_awcp-mkn-build'}, mainComponent=Component{uuid='AYs4Y77_ABJ996dhnqkQ', key='CCT_awcp-mkn-build', name='CCT_awcp-application-build'}, submitter=User{uuid='AYm5_WrdSzrTuuEL5IJ_', login='sonar-service-account'}}
at org.sonar.ce.queue.InternalCeQueueImpl.lambda$remove$0(InternalCeQueueImpl.java:115)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.sonar.ce.queue.InternalCeQueueImpl.remove(InternalCeQueueImpl.java:115)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.finalizeTask(CeWorkerImpl.java:245)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.afterExecute(CeWorkerImpl.java:239)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.close(CeWorkerImpl.java:199)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:161)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
It tells me that your DB connections are timing out. That’s why it works for a while and then stops. How is SonarQube authenticating to your DB? With login/password? If so, the settings listed in SONAR-17762 may help.
I think which I pasted error in previous comment is something different one, its not related to this issue. I think there was issue with elastic search.
Can you please check this what needs to be done at elastic search. Since after cleaning up the data inside <Sonarqube_home>/data/es7, projects are reflecting in correct.
Hi @ganncamp
Still my problem is not resolved. I mean project count is not showing accurately. After deleting <Sonar_home>/data/es7 folder, i can able to see the accurate project count.
Please let us know what we can do to resolve this shouldn’t happen again frequently.