Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
I am using SonarQube Developer edition and trying to scan C/C++ code by using a sonar scanner on a Linux machine. On this Linux machine scanner is able to analyse whole code , but nothing is getting populated on Sonar Server on a different machine.
There is proper connectivity between both the machines and no network issues.
[root@localhost tgsconfig]# sonar-scanner \
> -Dsonar.projectKey=TestC \
> -Dsonar.sources=. \
> -Dsonar.host.url=http://192.168.0.9:9000 \
> -Dsonar.login=076102916eada129556ae556fab65dc4919e7929
INFO: Scanner configuration file: /root/sonar/sonar-scanner-4.2.0.1873-linux/conf/sonar-
scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 4.2.0.1873
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 2.6.32-754.25.1.el6.x86_64 amd64
INFO: User cache: /root/.sonar/cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=519ms
INFO: Server id: BF41A1F2-AW7qOZiSrlUWsutjEFF4
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=187ms
INFO: Load/download plugins (done) | time=6556ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=5ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=4ms
INFO: Project key: TestC
INFO: Base dir: /root/source/pre_Release_1.5.4_nrf2020/tgsconfig
INFO: Working dir: /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/.scannerwork
INFO: Load project settings for component key: 'TestC'
INFO: Load project settings for component key: 'TestC' (done) | time=84ms
INFO: Load project branches
INFO: Load project branches (done) | time=30ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=15ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=2ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=249ms
INFO: Load active rules
INFO: Load active rules (done) | time=2581ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 66 files indexed
INFO: Quality profile for cpp: Sonar way
INFO: ------------- Run sensors on module TestC
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=51ms
INFO: Using JAXBContext implementation: com.sun.xml.bind.v2.runtime.JAXBContextImpl
INFO: Sonargraph Integration: Custom metrics file '/root/.sonargraphintegration/metrics.properties'
not found
INFO: Sonargraph Integration: Created 53 predefined and 0 custom metric(s)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1
(file:/root/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access
operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=3ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=8ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=8ms
INFO: Sensor Quboo Sensor [quboo]
WARN: WARNING: Quboo will ignore this analysis because you haven't set the Quboo Access (and
Secret) Keys. Go to your Sonarqube server (as admin), Administration -> Configuration -> Quboo and
enter the values you find in your Quboo account settings.
INFO: Sensor Quboo Sensor [quboo] (done) | time=1ms
INFO: Sensor Sonargraph Integration [sonargraphintegration]
INFO: Sonargraph Integration: Processing SonarQube project 'TestC'
WARN: Sonargraph Integration: XML report file
'/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/target/sonargraph/sonargraph-sonarqube-
report.xml' not found
INFO: Sonargraph Integration: Finished processing SonarQube project 'TestC'
INFO: Sensor Sonargraph Integration [sonargraphintegration] (done) | time=0ms
INFO: Sensor CFamily [cpp]
INFO: Using build-wrapper output:
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/build_wrapper_output_directory1/build-
wrapper-dump.json
INFO: Available processors: 1
INFO: Using 1 thread for analysis according to value of "sonar.cfamily.threads" property.
INFO: Load project repositories
INFO: Load project repositories (done) | time=212ms
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsLocZoneInfoHandler.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsExitInfo.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsButtonConfigHandler.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsConfigHandler.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsStoreDeptConfig.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsStoreDeptConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsTATopicInfoHandler.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsAsrConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsUserJoinConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsConfigParamHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsConfigHandlerBase.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsBatteryConfig.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsLegacyRnRConfig.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsRnRServiceConfigHandler.cc
INFO: [pool-1-thread-1] /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsPairConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsEAServiceConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsTrainingAppConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsPlayStaticInfoConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsRemoteStoreConfigHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsStoreHierarchyInfoHandler.cc
INFO: [pool-1-thread-1]
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/TgsInventoryCategoryHandler.cc
INFO: 21 compilation units analyzed
INFO: Sensor CFamily [cpp] (done) | time=290903ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from:
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Reading UCFGs from:
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/.scannerwork/ucfg2/java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=10ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /root/source/pre_Release_1.5.4_nrf2020/tgsconfig/ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from:
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Reading UCFGs from:
/root/source/pre_Release_1.5.4_nrf2020/tgsconfig/.scannerwork/ucfg2/php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=150ms
INFO: SCM Publisher SCM provider for this project is: svn
INFO: SCM Publisher 42 source files to be analyzed
INFO: 1/42 source file have been analyzed
INFO: 11/42 source files have been analyzed
INFO: 22/42 source files have been analyzed
INFO: 33/42 source files have been analyzed
INFO: 40/42 source files have been analyzed
INFO: SCM Publisher 42/42 source files have been analyzed (done) | time=51149ms
INFO: CPD Executor 1 file had no CPD blocks
INFO: CPD Executor Calculating CPD for 41 files
INFO: CPD Executor CPD calculation finished (done) | time=183ms
INFO: Analysis report generated in 413ms, dir size=977 KB
INFO: Analysis report compressed in 213ms, zip size=306 KB
INFO: Analysis report uploaded in 115ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://192.168.0.9:9000/dashboard?id=TestC
INFO: Note that you will be able to access the updated dashboard once the server has processed the
submitted analysis report
INFO: More about the report processing at
http://192.168.0.9:9000/api/ce/task?id=AW_nB1ElHs7qwdPGuuFa
INFO: Analysis total time: 6:18.012 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 6:36.512s
INFO: Final Memory: 23M/98M
INFO: ------------------------------------------------------------------------
http://192.168.0.9:9000/api/ce/task?id=AW_nB1ElHs7qwdPGuuFa
O/P
{"task":{"id":"AW_nB1ElHs7qwdPGuuFa","type":"REPORT","componentId":"AW_l0zrUBS_wIQSikguy","componentKey":"TestC","componentName":"TestC","componentQualifier":"TRK","status":"FAILED","submittedAt":"2020-01-27T18:13:34+0530","submitterLogin":"admin","startedAt":"2020-01-27T18:13:34+0530","executedAt":"2020-01-27T18:13:35+0530","executionTimeMs":654,"logs":false,"hasScannerContext":false,"organization":"default-organization","warningCount":0,"warnings":[]}}
http://192.168.0.9:9000/dashboard?id=TestC
gives O/P
The last analysis has failed. More details available on the Background Task page.
Background Task page gives O/P.
Failed and the time at which scan was done.