SonarQube Project Analysis Cancelled

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    • SonarQube:
    • SonarQube Scanner
    • Java 1.8.0_275 Private Build (64-bit)
    • build-wrapper, version 6.6 (linux-x86)

Plugins: C/ C++/ Objective-C

OnPrem Sonarqube (Developer Edition), we have two instances one for Prod and another for DEV.

Prod - One Million lines of code.
Dev - 100K lines of code.

Sonarqube scan was successful from Jenkins (CICD tool) but when we initially published the report to Dev Sonar it errors out "The last analysis has failed to not exceed the 100000 lines of code limit allowed by the current license".

And then updated the sonar host property to Prod Sonar (Lines of code limit to 1M) and published again it says (Administration → Projects → Background Tasks) Project analysis cancelled. Both screenshots attached below.

Sonar Properties File:
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here

#----- Default SonarQube server 
## Sonar DEV

#----- Default SonarQube server 
## Sonar Prod

## Project properties
sonar.projectName=Project Scanning for group-test-libraries
sonar.sources=Individual projects path separated by comma

## Language specific
# sonar.cxx.compiler.charset=UTF-8

## SCM property
# sonar.lang.patterns.c : **/*.c,**/*.h
# sonar.lang.patterns.cpp : **/*.cc,**/*.cpp,**/*.cxx,**/*.c++,**/*.hh,**/*.hpp,**/*.hxx,**/*.h++,**/*.ipp

#----- Default source code encoding



Hey there.

A canceled project analysis almost always indicates that two SonarQube instances are using the same sonar.jdbc.url in their configuration and both are turned on. Only a single application instance can be connected to a database at a time. Is it possible that could be what is happening here?

(On that note, what is the Database provider you’re using? Postgres/Oracle/MSSQL Server?)

Hey @Colin

Thank you for your response. For prod (Sonar) instance the databases provider we are using PostgreSQL (Which is dedicated to Prod Sonar) and below are the versions. And also I confirm that there is no other application using this database.

Database Version: 9.6.18
Driver Version: 42.2.5.

Correction: In description I mentioned that “OnPrem SonarQube” which is actually deployed in kubernetes cluster