We are using SonarQube community edition 9.7 server is installed on RHEL machine. We scan a dot net project via Jenkins pipeline (Jankins master delegates to a windows node). We setup the sonarqube via SonarScanner.MSBuild.exe in the jenkinsfile.
All of a sudden scanner doesn’t work due to an error,
SonarQube analysis could not be completed because the analysis configuration file could not be found.
sonarqubeananalysisconfig.xml not found: c:/jenkins/ws/myprj_pipeline/.sonarqube\conf\SonarQubeAnalysisConfig.xml
What’s wrong here? I don’t see the file sonarqubeananalysisconfig anywhere in the installation.
I would suggest providing the full logs from your Jenkins pipeline, redacting information as neccessary.
And, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
9.7 → 9.9.1 → 10.1 (last step optional)
You may find these resources helpful:
If you have questions about upgrading, feel free to open a new thread for that here.
Build logs doesn’t have any other useful info. just 2 lines of error as I mentioned in the initial post. btw, The version I am using is 9.8 (build 63668). I think any above version requires JDK 17. I can’t upgrade it. My other 3 projects are running on JDK 11. The one we have above mentioned issue is for a C# dot net application.
Without more logs, I don’t think we can be helpful
That might be the output of the
SonarScanner.MSBuild.exe end but doesn’t represent your whole pipeline.
As mentioned, I would suggest providing the full logs from your Jenkins pipeline, redacting information as neccessary.
Thanks, I didn’t notice an error at the start of the build output.
First checkout state, 2nd SonarQube build stage that has 100s of lines of console output
SonarScanner for MSBuild 5.11
Using the .NET framework version of the scanner for MSBuild
Preparing working directories…
Updating build integration targets…
Failed to request and parse ‘http://localhost:9000/api/server/version’: Http status code is ServiceUnabailable.
Downloading from http://xx.xxx.xxx.29:9000/api/server/version…
Failed to request and parse ‘http://xx.xxx.xxx.29:9000/api/server/version’: Object reference not set to an instance of an object.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
In the sonar server conf file, sonar.web.host=xx.xxx.xxx.29
I tried http://xx.xxx.xxx.29:9000/api/server/version in the jenkins node via browser. It does work.
I think that the actual logs will be useful, rather than describing them. It’s odd that
localhost is called before an actual IP address.
And, can you try upgrading to the latest version of the Scanner for .NET, v5.13?
Please ignore localhost call, that was configuration issue. I corrected it. In the previous version it did not make such call, Downloading from http://xx.xxx.xxx.29:9000/api/server/version