How to resolve "HttpException: Error 413" (SonarQube)
I had the same error where my sonarqube server was behind an nginx proxy.
413
== Request entity too large
as @jeroen-heier said.
I applied a change to my nginx configuration like this
server { ... client_max_body_size 20M; ....}
to allow requests to be 20 megabytes, and that fixed it.
In case you're using nginx-ingress
, addnginx.ingress.kubernetes.io/proxy-body-size: "20M"
into the annotations:
If you run sonar in docker , the default sonar image does not contain nginx server, so there're nothing can do in container
I ran it in k8s, there's a ingress before sonar service, so you should config the ingress and the service
apiVersion: extensions/v1beta1kind: Ingressmetadata: name: sonarqube namespace: default annotations: ingress.kubernetes.io/proxy-body-size: "20M"spec: rules:...
To get this via the helm chart, add
ingress: enabled: true annotations: ingress.kubernetes.io/proxy-body-size: "20M"