Sonarqube code analysis step is failing

we are using soanrqube version 9.6.1.59531 and hosted on azure webapp container. it is failing with the below error for one of the build pipeline among many of them sharing the same agent. Please check and help me to find out the problem and resolution.

detailed error log:

Starting: SonarQubePrepare
==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 4.31.0
Author       : sonarsource
Help         : Version: 4.31.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
C:\AzureDev\Agent_2\vsts-agent-win-x64-2.198.2\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.31.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:VMS
SonarScanner for MSBuild 5.8
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
08:05:43.668  Updating build integration targets...
08:05:44.402  Fetching analysis configuration settings...
08:05:45.192  Provisioning analyzer assemblies for cs...
08:05:45.193  Installing required Roslyn analyzers...
08:05:45.617  Provisioning analyzer assemblies for vbnet...
08:05:45.617  Installing required Roslyn analyzers...
08:05:45.667  Pre-processing succeeded.
Finishing: SonarQubePrepare

Error at code analysis: 

EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 4:46.428s

INFO: Final Memory: 179M/620M

INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Failed to upload report: Fail to request url: <<sonarurl>>
java.lang.IllegalStateException: Failed to upload report: Fail to request url: <<sonarurl>>
##[error]at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:206)
    at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:206)
##[error]at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
    at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
##[error]at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:369)
    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
    at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:369)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at com.sun.proxy.$Proxy0.execute(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at com.sun.proxy.$Proxy0.execute(Unknown Source)
##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Hi team,

can i get some response?

Hello,

We are also facing the same issue with our sonarqube instance. Version is 9.6.1.59531 Enterprise edition.

Thanks.

Hi Team,

Can you plz check and respond us back?

Colin – can you plz help us with quick resolution, we have been from very long time. this is really blocking our enabling of sonarqube in our project.

Hi,

Is there any more to the stacktrace?

Typically when analysis fails at the report upload stage, it’s something “helpful” on the network, e.g. a proxy, blocking the upload because of the file size. That would explain why it happens for only one pipeline/project.

You should talk to your network folks.

 
HTH,
Ann

Thanks ann for the response. i will check with our network team and will update here.

we have found that our WAF was blocking this requesting due to large size file and we have added exceptions to pass with sonar step.

Thank you so much for you input.

1 Like