"error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body>\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.25.2</center>\r\n</body>\r\n</html>\r\n" while pushing calico node image version 3.27.4"
NOTE: If you are using a reverse proxy (like Nginx) in front of Harbor, then the default size would be in place to 1 MB. For example, Nginx has a default client_max_body_size of 1 MB, which you might need to increase.
TCA 3.1
The error message encountered, "413 Request Entity Too Large," indicates that the HTTP request you're trying to send exceeds the size limit configured on the server. This often happens when uploading a large file or a large payload. The error is coming from the nginx server, which is acting as a reverse proxy or load balancer.
To resolve this issue, kindly increase the maximum allowed request size in nginx configuration.
Step 1: Locate your nginx configuration file:
The main configuration file is located at :
/etc/nginx/nginx.conf
the client_max_body_size directive:
Step 2: Open the nginx configuration file in a text editor.
For example, use nano or vim:
sudo nano /etc/nginx/nginx.conf
Add or update the client_max_body_size directive inside the http block
http {
...
client_max_body_size 100M; # Adjust the size as needed
...
}
Step 3: Save the file
Step 4: Restart ngnix
systemctl restart ngnix
Step 5: Retry the container push image