Issue uploading report to SonarQube deployment using SonarScanner in Azure pipeline


We’re having some issues with uploading the report to the SonarQube deployment using SonarScanner in an Azure pipeline. The strange thing is that this is working for other branches, but this specific feature branch causes this to fail. The pipeline for dealing with installing/uploading with SonarScanner is shared for all branches and should work the same way.

The exception showing up in the logs is java.lang.IllegalStateException: Fail to request <URI to SonarQube deployment> (same URI used in the branches where it’s working).

This is the full exception:

INFO: Sensor C# [csharp] (done) | time=932ms
INFO: Sensor C# Tests Coverage Report Import [csharp]
INFO: Parsing the OpenCover report /home/vsts/work/1/s/TestResults/Coverage/coverage.opencover.xml
INFO: Adding this code coverage report to the cache for later reuse: /home/vsts/work/1/s/TestResults/Coverage/coverage.opencover.xml
INFO: Coverage Report Statistics: 329 files, 329 main files, 329 main files with coverage, 0 test files, 0 project excluded files, 0 other language files.
INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=1061ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=5ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 37 source files to be analyzed
INFO: SCM Publisher 37/37 source files have been analyzed (done) | time=678ms
INFO: CPD Executor 128 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 373 files
INFO: CPD Executor CPD calculation finished (done) | time=142ms
INFO: Analysis report generated in 242ms, dir size=5 MB
INFO: Analysis report compressed in 1137ms, zip size=2 MB
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 16.408s
INFO: Final Memory: 9M/34M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to request <URI to SonarQube deployment>
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.batch.bootstrapper.Batch.doExecute(
	at org.sonar.batch.bootstrapper.Batch.execute(
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.main(
Caused by: okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR
	at okhttp3.internal.http2.Http2Stream.checkOutNotClosed$okhttp(Http2Stream.kt:648)
	at okhttp3.internal.http2.Http2Stream$FramingSink.emitFrame(Http2Stream.kt:560)
	at okhttp3.internal.http2.Http2Stream$FramingSink.write(Http2Stream.kt:535)
	at okio.ForwardingSink.write(ForwardingSink.kt:29)
	at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.kt:218)
	at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255)
	at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:194)
	at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167)
	at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.kt:157)
	at okhttp3.MultipartBody.writeTo(MultipartBody.kt:93)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:59)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	... 25 more

We’ve tried running it with verbose logging on, but it doesn’t return any more details about the upload or exception.

The only difference in the info between the working upload and the failing one is the final memory, which is 8M in the upload that succeeds instead of 9M for the upload that fails. In other words, there are more tests in this branch.

The SonarScanner version is and the SonarQube deployment is Community Edition Version 8.6.1.

Is it possible to debug this on the SonarQube-side? The report never gets there, but is it possible to detect why the request failed?

We also have other services/projects running and using the same pipeline-script template that is working completely fine.

Anyone has any idea on what could cause this? Any help would be greatly appreciated!


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:

8.6.1 → 8.9.10 → 9.9 → 10.0 (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.

Regarding your question, there is likely something on your network, e.g. a proxy with a hard-coded file size limit, that’s blocking the analysis report submission. You should check with your network folks.


1 Like


I see, thanks for your guide and help!

Best regards,