Request Body is Required

Hello,

every time i try to use the Kibana Dev Tools, if the request has a body it fails with this:

Yes, there are no newlines and also the request body is there:
image

I saw many similar threads, but all without solutions:
https://discuss.elastic.co/t/how-to-understand-the-error-of-reindex-request-body-is-required/300278
https://discuss.elastic.co/t/request-body-is-required/275691
https://discuss.elastic.co/t/reindex-fails-in-kibana-devtools-console-but-succeeds-on-command-line-using-curl/237266

Did anyone find out in the meantime what causes this?

Best regards
Jonas

Hi Jonas,

I'm guessing there are extra characters somewhere in the request that are causing the error. Sadly it's difficult to tell as you've provided a screenshot rather than the raw console request.

I found this one worked for me, which I built using the autocomplete in the console.

PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}

Can you give that a try? Or alternatively use the autocomplete (control + space on Mac) to form the body of the request and then add the string property name.

Let me know if that works out!

No, there is absolutely no formatting problem here. I already posted a screenshot of the request body in the browser.

I tried your snippet and of course it is the same.

Thanks for clarifying. Did you also try recreating using the autocompletion to ensure there aren't any other characters such as extra spaces that could be causing the issue?

Can you also share your snippet using the code tags rather than the screenshot so we can try and reproduce?

Yes, there are no spaces.

PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}

But really, the request does not matter. I just took one from your upgrading tutorial. Any request with a body fails with this error and i tried it many times

Thanks for confirming it's not just the cluster request type. The requests are working on my side on my toy cluster, which is 8.4. So I'm not able to reproduce. Not sure which version you're on?

It might be worth reaching out via Elastic support or alternatively raising a GitHub issue on Kibana for this one. Unless others from the community come back with other ideas...

I'm currently on 8.5.2, but had this problem since some months now, also with previous versions. I was hoping that a new version would fix it, but as it seems it happens only under certain conditions.
But clearly i'm not the only one having the issue.
I was also thinking if it can be network problems or certificate related, but then other requests without a body would also fail, right?
And i'm having no problem at all with requests without a body.

The support link you posted is only for cloud? We have an on prem stack. As i understand there is no support for it without a licence, right?

Github issue: Request body is required · Issue #147457 · elastic/kibana · GitHub

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.