SonarQube 5.3 The initial task does not work, there is no entrance to the dashboard

I know that this is similar to the background tasks of sonarqube 5.2 sometimes fail without a log - however, I cannot comment (due to lack of reputation points) to add additional information, so I tried to add this message as an answer, but did he delete the moderators .. .

I had a problem with SonarQube 5.2 , and now 5.3 after updating yesterday. I tried to activate logging on TRACE on the server and enable sonar.verbose = true in the project itself.

However, at the exit from the maven assembly there is no additional information - just normal:

ANALYSIS SUCCESSFULLY, you can view xxx in build logs.

I see POST /api/ce/submit?projectKey=xxxx&projectName=yyyy | time=757ms /api/ce/submit?projectKey=xxxx&projectName=yyyy | time=757ms in server log files, but nothing more.

I also see a zip file in data\ce\reports with a name that matches the identifier in the build log (for example: AVI19fDPpe3MLWoccJn9.zip)

However - I get intermittent crashes on the background task screen - without communication with the log on the background task screen, and no logs are created in the data\ce\logs\reports directory.

I resorted to rebuilding the sonarbek database from scratch for 5.3 (since we had no history anyway) - and the error still occurred.

I use:

  • Oracle DB on new sonarqube 5.3 installation
  • Plugins
    • Sonar-Java-plugin-3.9
    • Sonar plugin with LDAP-1.5.1
    • sonar-scm-perforce-plugin-1.3 (although there is currently sonar.scm.disabled=true since we had problems in the previous version)
    • sonar-csharp-plugin-4.3 (not relevant to this java analysis)
    • sonar-scm-git-plugin-1.1 (not relevant to this analysis)
    • sonar-scm-svn-plugin-1.2 (not relevant to this analysis)
  • I am creating a Maven project using sonar-jacoco-listeners v 3.2 (also tried 2.9.1)
+6
source share
1 answer

You have a very strange problem.

Summarizing:

  • from time to time
  • the background task is processed without registering in sonar.log or the task log in the data/ce/logs directory
  • the task failed (as seen in the SQ user interface)
  • he worked for a very short time
  • the zip file report is still present in the data directory

The only time we encountered such a scenario, it turned out that two SonarQube instances were running in the same database, and this is what happens:

  • SQ A (the one you know and track) receives a report, saves the zip file to its data directory, and adds a record (background task) to the DB
  • SQ A and SQ B regularly check databases to process PENDING elements. Sometimes SQ B will be the first to select a record from the database and start processing it. Since the report is not in the data directory, processing very quickly fails, and the record is marked as an error in the database
  • SQ A never tries to process a record, because from its point of view it is either PROCESSING (when SQ B is working on it) or FAILED (when SQ B is being performed on it). Only PENDING items can be processed. Thus, no log appears in SQ A sonar.log, and a task log is not created. However, in the user interface the background task is displayed as unsuccessful, since the user interface displays information from the database.

A good hint that the processing (i.e. changing the state of the record in the database) was not performed by SQ A, is that the zip report file is still present in the data directory. Changing the recording status to FAIL or SUCCESS is closely related to deleting the zip file.

This is just a hint since deleting may also fail, but in this case you will have ERROR in the logs.

+10
source

All Articles