Vineeth NG
Vineeth NG

Reputation: 270

Sonarqube Failed to upload report 413

I am running sonarqube using gradle command ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url. I am getting error Failed to upload report - HTTP code 413. Request Entity Too Large. I am using sonarserver version : Community Edition Version 7.8. I am running sonar report using gradle command: ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url I am getting error Failed to upload report. Sonarqube server is on oracle cloud (oci) node and the report file size is 10M.

Upvotes: 2

Views: 5564

Answers (2)

Breaking News
Breaking News

Reputation: 420

2023 Update

If you are using Kubernetes Ingress from Nginx Inc. try below:

  annotations:
    nginx.org/client-max-body-size: "500m"

Upvotes: 1

Fahim Foysal
Fahim Foysal

Reputation: 139

413 Request Entity Too Large

I got this when I was using the Nginx server for SonarQube.

Explanation

A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.

Solution

For Nginx servers

To allow the request size to be up to 20 megabytes, add the following line to your Nginx configuration file:

  ...  
  client_max_body_size 20M;  
  ....  

configuration files should be found in /etc/nginx/ directory

Tips

  • I would recommend updating the dedicated configuration file for SonarQube server placed inside /etc/nginx/sites-enabled/ folder
  • this property can be placed inside the server {...} , http {...} or, location{...} block of the configuration file

Upvotes: 4

Related Questions