SonarQube Project Analysis Cancelled

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

Plugins: C/ C++/ Objective-C

Description:
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
 sonar.host.url=https://sonar.dev.xyz.com
 sonar.login=some-login
 sonar.projectVersion=1.0

#----- Default SonarQube server 
## Sonar Prod
#sonar.host.url=https://sonar.xyz.com
#sonar.login=some-prod-login
#sonar.projectVersion=1.0

## Project properties
sonar.projectKey=org.sonarqube:group-test-libraries
sonar.projectName=Project Scanning for group-test-libraries
sonar.sources=Individual projects path separated by comma
#sonar.branch.name=feature/branch
#sonar.cfamily.cache.enabled=false


## Language specific
sonar.language=c++,c
sonar.cfamily.build-wrapper-output=sonar_bwrapper_output
# sonar.cxx.compiler.charset=UTF-8

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

#----- Default source code encoding
sonar.sourceEncoding=UTF-8
```

Images:
DEV:

Prod:

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