0
votes

Below is the log when i run the sonar runner:

[OMC3_B12_LINUX6] sonar@omclinux03> ./sonar-runner SonarQube Runner 2.4 Java 1.6.0_22 Sun Microsystems Inc. (64-bit) Linux 2.6.32-220.el6.x86_64 amd64 INFO: Runner configuration file: /home/sonar/sonar/sonar-runner-2.4/conf/sonar-r unner.properties INFO: Project configuration file: NONE INFO: Default locale: "en_US", source code encoding: "UTF-8" INFO: Work directory: /home/sonar/sonar/sonar-runner-2.4/bin/./.sonar ERROR: Sonar server 'http://localhost:9000' can not be reached INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 0.065s Final Memory: 5M/964M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: java.net.ConnectException: Connection refused ERROR: Caused by: Connection refused ERROR: ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with t he -e switch. ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

1
Are you using the community plugin or the commercial, SonarSource plugin? - G. Ann - SonarSource Team
its community plugin - Sanjay Singh

1 Answers

0
votes

Logs says sonnar-runner can not find a SonarQube instance running on the current machine and listening on port 9000:

ERROR: Sonar server 'http://localhost:9000' can not be reached

Sonnar-runner needs a SonarQube instance to run an analysis. See the 4 first steps of "Get Started in Two Minutes" here

C++ support in SonarQube is provided by a commercial plugin, so you should start by reading its documentation. There is a community plugin also, I think.

For the installation of SonarQube, which ever the platform, see the documentation and the getting started link above.