SonarQube post processing fails with unknown reason


(Padmanabha Kamath) #1

(already posted at stackoverflow -

SonarQube is failing without any meaningful error message for a .NET C# project.

I tried running the end command with the -X option but the -X format is unrecognized.

SonarScanner.MSBuild.exe end -X /d:sonar.login=“87195”

Any ideas on what could be wrong ? I ran a simpler project with 2 - 3 cs files and that succeeds.

INFO: Sensor Python Squid Sensor [python] (done) | time=1880ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=529ms
INFO: Sensor SonarCSS Metrics [cssfamily]
INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=9835ms
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 9:31.651s
ERROR: Error during SonarQube Scanner execution
ERROR: null
INFO: Final Memory: 26M/1008M
INFO: ------------------------------------------------------------------------
The SonarQube Scanner did not complete successfully
14:53:45.844  Creating a summary markdown file...
14:53:45.847  Post-processing failed. Exit code: 1

(Amaury Levé) #2

Hi @pkamath,

You are right the -X option doesn’t work with the scanner for msbuild and on newer versions we no longer show this message.

Could you let us know the versions of:

  • SonarQube
  • SonarC#
  • Scanner for MSBuild

Also could you share the full log of the end step in debug (passing /d:sonar.verbose=true in the begin step).


(Padmanabha Kamath) #3

Hi Amaury,

  • SonarQube - v7.3
  • SonarC# - v7.3.2.6129
  • Scanner for MSBuild - v sonar-scanner-msbuild-

I am not sure which log file you need, can you tell me exactly where the relevant information would be ? I tried redirecting the output to a text file and attaching that but it is around 8 MB.

However, this is the “tail” of that log

14:37:48.170 DEBUG: Using pattern ‘’ to find reports
14:37:48.694 DEBUG: No report was found for sonar.python.coverage.itReportPath using default pattern
14:37:48.694 DEBUG: Using pattern ‘’ to find reports
14:37:49.220 DEBUG: No report was found for sonar.python.coverage.overallReportPath using default pattern
14:37:49.221 INFO: Sensor Python Squid Sensor [python] (done) | time=1864ms
14:37:49.221 INFO: Sensor PythonXUnitSensor [python]
14:37:49.221 DEBUG: Using pattern 'xunit-reports/xunit-result-.xml’ to find reports
14:37:49.741 DEBUG: No report was found for sonar.python.xunit.reportPath using default pattern xunit-reports/xunit-result-
14:37:49.741 INFO: Sensor PythonXUnitSensor [python] (done) | time=520ms
14:37:49.741 INFO: Sensor SonarCSS Metrics [cssfamily]
14:37:59.639 INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=9898ms
14:37:59.639 INFO: Sensor SonarCSS Rules [cssfamily]
14:37:59.639 DEBUG: Checking node version
14:37:59.680 DEBUG: Using Node.js v8.9.0
14:37:59.680 DEBUG: Deploying bundle to E:\Jenkins\workspace\Symphony\Source.sonarqube\out.sonar\Symphony_Symphony_F58C2F00-0CE5-4F5D-A3D7-D3A9BFACA47B
14:39:04.196 INFO: ------------------------------------------------------------------------
14:39:04.196 INFO: ------------------------------------------------------------------------
14:39:04.197 INFO: Total time: 9:50.521s
14:39:04.315 INFO: Final Memory: 25M/1000M
14:39:04.315 INFO: ------------------------------------------------------------------------
Process returned exit code 1
14:39:04.55 Creating a summary markdown file…

(Padmanabha Kamath) #4

I looked under sonarqube-7.3/logs and this is what is in the sonar.txt file

2018.08.16 14:23:53 INFO app[][o.s.a.SchedulerImpl] Stopping SonarQube
2018.08.16 14:23:57 INFO app[][o.s.a.SchedulerImpl] Process [ce] is stopped
2018.08.16 14:24:00 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.08.16 14:24:00 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.16 14:24:00 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
–> Wrapper Started as Console
Launching a JVM…
Wrapper (Version 3.2.3)
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.08.16 14:24:07 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-7.3\sonarqube-7.3\temp
2018.08.16 14:24:08 INFO app[][] Elasticsearch listening on /
2018.08.16 14:24:08 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube-7.3\sonarqube-7.3\elasticsearch]: C:\Program Files\Java\jre1.8.0_151\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube-7.3\sonarqube-7.3\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\sonarqube-7.3\sonarqube-7.3\temp\conf\es
2018.08.16 14:24:08 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.16 14:24:08 INFO app[][o.e.p.PluginsService] no modules loaded
2018.08.16 14:24:08 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.16 14:24:18 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2018.08.16 14:24:18 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube-7.3\sonarqube-7.3]: C:\Program Files\Java\jre1.8.0_151\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube-7.3\sonarqube-7.3\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/;C:\sonarqube-7.3\sonarqube-7.3\lib\jdbc\h2\h2-1.3.176.jar C:\sonarqube-7.3\sonarqube-7.3\temp\sq-process5193581792582245148properties
2018.08.16 14:24:33 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
2018.08.16 14:24:33 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key=‘ce’, ipcIndex=3, logFilenamePrefix=ce]] from [C:\sonarqube-7.3\sonarqube-7.3]: C:\Program Files\Java\jre1.8.0_151\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\sonarqube-7.3\sonarqube-7.3\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/
;C:\sonarqube-7.3\sonarqube-7.3\lib\jdbc\h2\h2-1.3.176.jar C:\sonarqube-7.3\sonarqube-7.3\temp\sq-process568380124642470408properties
2018.08.16 14:24:39 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
2018.08.16 14:24:39 INFO app[][o.s.a.SchedulerImpl] SonarQube is up

(Amaury Levé) #5

Hi @pkamath,

I am looking for all the lines produced by the scanner for msbuild. Ideally the begin and end steps.

(Padmanabha Kamath) #6

Here is the output of the end step … out.txt (1.5 MB)

The begin step output does not look too interesting (at least to my untrained eye anyways)

SonarScanner for MSBuild 4.3.1
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\sonarqube-7.3\sonar-scanner-msbuild-\SonarQube.Analysis.xml
Loading analysis properties from C:\sonarqube-7.3\sonar-scanner-msbuild-\SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories…
16:58:24.526 Updating build integration targets…
16:58:24.577 Fetching analysis configuration settings…
16:58:25.36 Provisioning analyzer assemblies for cs…
16:58:25.361 Installing required Roslyn analyzers…
16:58:25.592 Pre-processing succeeded.

(Padmanabha Kamath) #7

I have mentioned before that for small projects this is working great i.e. I can see the results in the localhost webpage.

What would be the command to direct sonarqube to look at one folder only i.e. limit the analysis to one project ?

Thank you !

(Amaury Levé) #8

Hi @pkamath,

There seems to be an issue with SonarCSS but for some reason the error doesn’t show up in the log (I am investigating why).

In the meantime, I recommend that you disable the CSS analysis on your project (by changing the extension for css files /

(Amaury Levé) #9

A post was split to a new topic: SonarJS: OutOfMemoryError

(Amaury Levé) #10

A post was merged into an existing topic: SonarJS: OutOfMemoryError