Support Questions
Find answers, ask questions, and share your expertise

Adding hosts to cluster, HTTP 413 (request too large)

New Contributor

Using the wizard that adds hosts to a cluster, I was trying to add 16 hosts. The form submission on the parcel page resulted in a 413 HTTP status indicating that the web server refused the request because it was too large. I was able to submit the form if I selected only 1 host. This made the request small enough.

 

Inspecting the network activity in my browser I found that the submission included a lot of cookies from the domain under which the manager resides. The response from the server also seemed to indicate that it was offended by the size of the request headers. After clearing those cookies I was able to submit the form with all 16 hosts.

 

Is it possible to configure the manager's web server to accept larger requests? Ideally any limit on HTTP header size would be high enough to avoid this issue.

4 REPLIES 4

Re: Adding hosts to cluster, HTTP 413 (request too large)

Champion Alumni

I beleive the default number of hosts is 10 but it is defintely configurable in the GUI.Refer to the below link:

 

http://community.cloudera.com/t5/Cloudera-Manager-Installation/How-to-install-Cloudera-on-10-nodes-s...

 

Re: Adding hosts to cluster, HTTP 413 (request too large)

New Contributor

@Nishan wrote:

I beleive the default number of hosts is 10 but it is defintely configurable in the GUI.Refer to the below link:


This is a different issue.

 

It struck again today when trying to add 32 hosts. I had less than 2KB in cookies, but the HTTP 413 response (full head) error occurred when I selected all 32 hosts. When I cleared the cookies the request became small enough for the server to accept.

 

My concern is that I'm going to be stuck going through the process in a bunch of small batches when I have a hundred nodes to add at once. And only because an arbitrary limit was too low.

 

Re: Adding hosts to cluster, HTTP 413 (request too large)

Master Collaborator

What version of CM is this, and can we see some of the log snippets you are referring to (with the errors)?

 

Also, I'm not sure this matters here, but since we're talking about cookies, what browser (and version), and platform are you running this test on?  

 

Also, can you clarify what page you are on during the Add Hosts Wizard when you see this error?  Any reproduction steps you can provide would be helpful.

 

Regards,

 

Clint

Re: Adding hosts to cluster, HTTP 413 (request too large)

New Contributor

The error occurs in CM 5.0.0. It first appeared during the wizard but it will occur on any HTTP request with headers too large. If you have too large cookies it makes the entire manager web UI unusable: every request returns a 413.

 

To reproduce, browse to a CM5 site and then open your browser console to create some very large cookies. This javascript will create 4KB of cookies:

var kb="1";for(var i=0;i<10;++i)kb=kb+kb;for(var i=0;i<4;++i)document.cookie="test"+i+"="+kb;

To verify your cookies are large, evaluate this in the console:

document.cookie.length

 

Now try reloading CM (in the same tab where you added the cookies). You should get a white screen. Your browser's network activity panel will show you the "413 FULL head" HTTP response.

 

This will remove the large cookies we created:

for(var i=0;i<4;++i)document.cookie="test"+i+"=";

 

I'm not familiar with CM's web server but in other web servers where I have seen limits on HTTP request header size they have been configurable. This limit should be increased to 16KB at least.