Worked in 5.3, upgraded to 6, now its busted =/

Hey fellas,

I know its been a while since I have been on the forums but everything was working until our administrator decided to upgrade ES. Not a big deal, newer is better, right?

Anyway I am having issues with python 3.6 getting headers to play well with the new and improved ES. In the presvious version I didnt have to set headers, but now I do because I keep on getting "Http Error: 406 Client Error: Not Acceptable"... Here is the snip of code I think is where the issue is at.

headers = {'Content-Type': 'application/json'}

    response = requests.get('{}/logstash*/_search'.format(url), data=json.dumps(data), headers=headers,
                            auth=(un, pw))

Can you try with post?

doing a post gives me the same error:

Http Error: 406 Client Error: Not Acceptable

Can you try sniffing the traffic with wireshark or something similar to see if the headers are actually sent to the server and look right?

I am about to leave for the day. I can print them out tomorrow when I get back, do you have an example of what they should look like? A print command should show what is being sent.

It should look similar to what you get when you send a curl request that works.

Is this running locally or by chance is it running through an AWS ALB?

The server is local Fatal.

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