# 400 The plain HTTP request was sent to HTTPS port

**URL:** <https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284>\
**Category:** Kibana\
**Created:** [April 13, 2022, 12:49am UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284 "2022-04-13T00:49:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![safarial.fatemeh](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@safarial.fatemeh](https://discuss.elastic.co/u/safarial.fatemeh)\
**Post date:** [April 13, 2022, 12:49am UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284/1 "2022-04-13T00:49:49Z")

</div>

Hi, I'm using python client only (have not installed Elasticsearch on my machine) and I'm trying to query kibana and I get following error message:  
Elasticsearch.exceptions.RequestError: RequestError(400, '\r\n400 The plain HTTP request was sent to HTTPS port  
I don't have Elasticsearch conf file to update the ssl option to solve the issue.  
any idea how I can resolve it?

---

<div class="post-metadata">

**Author:** ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)\
**Post date:** [April 13, 2022, 9:58am UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284/2 "2022-04-13T09:58:20Z")

</div>

Hi and welcome to our community

Could you elaborate what are you trying to query? Kibana REST interface? I guess it's more likely you're querying Elasticsearch? is there no way to configure the python client to use http?

Best,  
Matthias

---

<div class="post-metadata">

**Author:** ![safarial.fatemeh](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@safarial.fatemeh](https://discuss.elastic.co/u/safarial.fatemeh)\
**Post date:** [April 18, 2022, 5:19pm UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284/3 "2022-04-18T17:19:47Z")

</div>

Thanks Matthias;  
@matw  
I'm trying to query Kibana to pull all the data in the specific index. I'm using Elasticsearch library to query Kibana.  
I didn't find any settings in the python client to configure http. When I use postman, I can ignore https and query is successful but when I try to do the same thing using Elasticsearch, I get this error  
just to emphasize that I did not install Elasticsearch and I'm just using python client  
Thanks

---

<div class="post-metadata">

**Author:** ![safarial.fatemeh](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@safarial.fatemeh](https://discuss.elastic.co/u/safarial.fatemeh)\
**Post date:** [April 18, 2022, 6:23pm UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284/4 "2022-04-18T18:23:46Z")

</div>

I guess I found the answer: need to add these two flags when instantiating the Elasticsearch:  
verify\_certs=False, ssl\_show\_warn=False

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 16, 2022, 6:24pm UTC](https://discuss.elastic.co/t/400-the-plain-http-request-was-sent-to-https-port/302284/5 "2022-05-16T18:24:03Z")

</div>

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