-
which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
→ Community Edition, Version 9.9.2 (build 77730) → planning update soon
→ sonar scanner cli : ScannerCLI/6.2.1.4610 -
how is SonarQube deployed: zip, Docker, Helm
→ zip -
what are you trying to achieve
→ executing a build in Azure DevOps on an Azure VM as an Azure devops agent, hoping to recieve the report in SonarQube Server on prem behind a Netscaler.
→ other builds executing the sonarscan on the same VM are working fine.
→ this build has a quite larger scanner report
→ passed build that succeeded was more then 3 weeks ago with a zip size of 26.2MB
→ traced the incoming requests on the netscaler and this particular one build doesn’t seem to enter with a POST for the ce/submit call
→ Other builds do pass in the Netscaler trace. -
what have you tried so far to achieve this
→ tried to setup a new build server in the cloud → ubuntu22.4 → noluck
→ tried -X on the sonarscanner command, no further details why the POST is failing
ERROR fro the log:
16:09:57.866 DEBUG SCM revision ID '55362ea1bxxxxxxxxxxxxxxxxx'
16:09:58.949 INFO Analysis report generated in 908ms, dir size=88.6 MB
16:10:04.341 INFO Analysis report compressed in 5391ms, zip size=26.4 MB
16:10:04.341 INFO Analysis report generated in /home/vinxccxcxcxcx/myagent/_work/2/s/app-api/.scannerwork/scanner-report
16:10:04.341 DEBUG Upload report
16:10:07.151 DEBUG POST 400 https://sonarqube.xxxxxxxxxx.com/ | time=2809ms
16:10:07.174 INFO EXECUTION FAILURE
16:10:07.176 INFO Total time: 12:57.560s
16:10:07.176 ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Failed to upload report: closed
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:226)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:154)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:376)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.lib.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:41)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.sonarsource.scanner.lib.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:62)
at jdk.proxy3/jdk.proxy3.$Proxy2.execute(Unknown Source)
at org.sonarsource.scanner.lib.InProcessScannerEngineFacade.doAnalyze(InProcessScannerEngineFacade.java:39)
at org.sonarsource.scanner.lib.ScannerEngineFacade.analyze(ScannerEngineFacade.java:61)
at org.sonarsource.scanner.cli.Main.analyze(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:63)
Caused by: java.lang.IllegalStateException: closed
at okio.RealBufferedSource.select(RealBufferedSource.kt:221)
at okhttp3.internal.Util.readBomAsCharset(Util.kt:265)
at okhttp3.ResponseBody.string(ResponseBody.kt:187)
at org.sonarqube.ws.client.OkHttpResponse.content(OkHttpResponse.java:81)
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:34)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:126)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:89)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:224)
... 18 common frames omitted''
Don’t see any post comming into the Sonarqube logs also, or any sign of error on the server side. On the build agent, no detailed logs of this error found…
[26/feb./2025:16:02:04 +0100] "GET /api/settings/values.protobuf?component=XXXXXXXXX%3AGPF_App_api HTTP/1.1" 200 6309 "-" "ScannerCLI/6.2.1.4610" "AZO2xxxxxxxxxxxxxxx"
[26/feb./2025:16:02:04 +0100] "GET /api/qualityprofiles/search.protobuf?project=XXXXXXXXX%3AGPF_App_api HTTP/1.1" 200 2794 "-" "ScannerCLI/6.2.1.4610" "AZO2xxxxxxxxxxxxxxx"
[26/feb./2025:16:02:07 +0100] "GET /api/analysis_cache/get?project=XXXXXXXXX:GPF_App_api HTTP/1.1" 404 - "-" "ScannerCLI/6.2.1.4610" "AZO2xxxxxxxxxxxxxxx"
[26/feb./2025:16:02:08 +0100] "GET /batch/project.protobuf?key=XXXXXXXXX%3AGPF_App_api HTTP/1.1" 200 - "-" "ScannerCLI/6.2.1.4610" "AZO2xxxxxxxxxxxxxxx"
really stuck here. Thanks for pointing us in the right direction!
br
Vincent