413 Request Entity Too Large

  • Which versions are you using - SonarQube Community Build v24.12.0.100206
  • Hosted: AWS EC2 directly on instance, no middleware like ALB.
  • How is SonarQube deployed: Docker
  • Reverse Proxy: Cloudflare (Maximum Upload Size - 100MB)
  • DevOps Platform: Github Actions
  • What are you trying to achieve: setup code scanning workflow using sonarqube on Github Actions
  • Issues: I have 6 Github SCM repositories each with its corrosponding sonarqube project. 3 of them are working as expected and uploading reports on the sonarqube server, the rest 3 aren’t.
    I’m getting 413 error, it can’t be a network issue since rest 3 are working fine:
    The workflow idea is this:
    Dev Pushes code → Git Action workflow start → scans the code → uploads to sonarqube
    Error occurs on workflow step : Run sonarsource/sonarqube-scan-action@master
    LOGS:
07:22:23.072 INFO Analysis report generated in 310ms, dir size=8.9 MB
07:22:24.071 INFO Analysis report compressed in 999ms, zip size=4.7 MB
07:22:25.463 ERROR Error during SonarScanner Engine execution
    java.lang.IllegalStateException: Failed to upload report: Error 413 on ***api/ce/submit? 
   projectKey=XXX-XXX&characteristic=devOpsPlatformUrl%3Dhttps%3A%2F%2Fapi.github.com&characteristic=devOpsPlatformProjectIdentifier%3DXXX : <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>
 at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:239)
 at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:163)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
 at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:355)
 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
 at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
07:22:25.797 INFO EXECUTION FAILURE
07:22:25.799 INFO Total time: 1:48.204s
Error: Process completed with exit code 3.

Hi,

Did you read the error you posted?

There is likely something on your network, e.g. a proxy, that’s blocking the analysis report submission. You should check with your network folks.

Why does this work for 3 and fail for 3? The analysis report submitted to the server is not a fixed size; it depends entirely on your project and what was found in it. Three of your projects are submitting analysis reports with sizes under the proxy threshold. Three are not.

 
HTH,
Ann