SonarQube- Version 5.1.1 - LGPL V3
Jenkins- ver. 1.651.3
Error Logs-
Pre-processing started.
Preparing working directories...
Checking for updates...
Could not connect to the SonarQube server. Check the url is correct and that the server is available. Url: http://abcd-ef-ghijkl.mnop-qrst.com
Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
Pre-processing failed. Exit code: 1
Related
The SonarQube docs specify:
When analysis is triggered from a Pull Request the SonarQube Scanner for MSBuild - End Analysis task decorates the updated source code in the Pull Request with the new code quality issues, instead of pushing the analysis report to the SonarQube server.
How can you turn this on? We are using TFS 2018 with version 3.x of the SonarQube TFS/VSTS extension.
The SonarQube for MSBuild - End Analysis task is deprecated now and it can not be used.
The workaround is execute SonarQube.Scanner.MSBuild.exe end command manually.
You can queue your build by the private agent which installs SonarQube Scanner for MSBuild.
I am trying to run the SonarQube Scanner within Jenkins as a post-build step. However, I keep getting the error message below:
------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: SonarQube Scanner executable was not found for SonarQube
Build step 'Execute SonarQube Scanner' marked build as failure
From similar questions on stackoverflow I read that one should choose "Install automatically" for the SonarQube Scanner, which I have done.
My configurations is as follows:
SonarQube 6.0
Jenkins 1.609.3
SonarQube Plugin 2.4.4
SonarQube Servers
SonarQube Scanner
Build-step
Make sure you are giving path in Global Tool Configuration correctly.
Give the path of folder in which bin folder is exists inside that folder.
Step1 : 1st find where the sonar_scanner bin is available -
root#test1sp117:/opt/sonar_scanner/sonar-scanner-3.0.3.778-linux# ls
bin conf jre lib
Step2 : Give the correct path in Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner
You may want to ensure that both SonarQube and SonarQubeRunner are installed. You would need to configure the SonarQube Runner bin in the Tool Configuration of Jenkins and not the SonarQube server. This fix worked for us.
When you config SonarQube Scanner in Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner, besides select "Install automatically", you also need to add a installer.
See screenshot here:
SonarQube Scanner --> Add Installer
I use Jenkins and plugin SonarQube and Sonar runner.
For SonarQube Runner installation in Jenkins, it made Warning like this.
/home/abc/sonnar-runner-2.4 is not a directory on the Jenkins master (but perhaps it exists on some slaves)
of course I made /home/abc/ directory on the Jenkins Server.
so.. i ignore the warning and try to build tho..
it made error like this.
SONAR ANALYSIS FAILED
FATAL: SonarQube runner executable was not found for sonar-runner-2.4
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
Finished: FAILURE
i cant figure out this problem
is there anyone know how to solve this?
When you config SonarQube Scanner in Manage Jenkins --> Global Tool Configuration --> SonarQube Scanner, besides select "Install automatically", you also need to add a installer.
See screenshot here:
SonarQube Scanner --> Add Installer
I am using Jenkins Version 1.545 and Sonarqube Version 4.2.When I execute Sonarqube analysis using jenkins build,my build fails with the following error:-
Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.3.1:sonar (default-cli) on project : Can not execute SonarQube analysis: Unable to request: /batch_bootstrap/properties?project=abc.project:abc.project-java:javascript: Read timed out.
This cannot be a network issue because sonar and jenkins are on same server.
This was intermittent issue earlier but has now become very frequent.
Kindly help to resolve the issue.
I'm trying to trigger a sonar analysis of an android application through Jenkins and the Sonar Runner plugin. I've added a "Invoke Standalone Sonar Analysis" build step to my job that builds the code using Ant. When it gets to the Sonar Analysis step it fails and outputs the following:
------------------------------------------------------------------------
SONAR ANALYSIS FAILED
------------------------------------------------------------------------
FATAL: Sonar runner executable was not found for Sonar Runner 2.2.2
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
The jenkins agent is a remote linux server where I have installed the sonar-runner in /opt/ and have updated appropriate SONAR_RUNNER_HOME and PATH variables.
Have I installed the runner correctly? I've looked at the documentation and other similar installation related questions but have not found what my problem could be.
Make sure to set the path of the runner correctly in Jenkins. It's the path without */bin in the end. That's a little tricky.
In the Manage Jenkins section, Configure... did you set the Sonar Runner Installations correctly? Check box Install automatically and install automatically the version from Codehaus.
Install Sonar Runner in the same server where Jenkins has been installed.