# Regarding executing https elastic search queries

**URL:** <https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008>\
**Category:** Elasticsearch\
**Created:** [June 16, 2016, 2:48pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008 "2016-06-16T14:48:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [June 16, 2016, 2:48pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/1 "2016-06-16T14:48:17Z")

</div>

The elastic search queries are not getting executed using curl command. It's throwing error. Whether https is supported for elastic search.

[2016-06-16 07:45:24,412][WARN][http.netty] [Helio] Caught exception while handling client http traffic, closing connection [id: 0xa2a86a18, /xxx.xxx.52.29:46978 =\> /xxx.xxx.52.29:9201]  
java.lang.IllegalArgumentException: empty text

Also how can we check if the http request from webpage is reaching the elastic search.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2016, 3:10pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/2 "2016-06-16T15:10:55Z")

</div>

Hey,

can you please be more specific and detailed on what is your problem and what you tried to do so far? You can show the configuration you changed, how you enabled SSL, which curl call you executed and so forth. Especially state what result your are expecting, otherwise it is hard to help.

Elasticsearch out of the box only uses HTTP without any encryption. Security (plus encryption) is available as a commercial plugin, see [the homepage](https://www.elastic.co/products/shield)

--Alex

---

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [June 16, 2016, 3:41pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/3 "2016-06-16T15:41:32Z")

</div>

Hi ,

I've not enabled the SSL.

We are calling elastic search queries using from an html file by creating the client. when the web page was put in a web server , the commands by default is send as https . we are not sure whether the http/https request is send to elastic search or whether the request is blocked due to some firewall

The curl query executed was curl -XGET '[https://xxx.xxx.xx.xx:9201/\_count?pretty](https://xxx.xxx.xx.xx:9201/_count?pretty)'

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 17, 2016, 6:54am UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/4 "2016-06-17T06:54:57Z")

</div>

If you are not using SSL, why do you call `curl` with `https` in its URL? This tells curl to use SSL or TLS

if you are not sure, maybe debug there first. Also, you should not expose Elasticsearch directly to the internet, in case you are doing this at the moment.

---

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [June 17, 2016, 7:07am UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/5 "2016-06-17T07:07:42Z")

</div>

Thanks . Okay i'm beginner in web based application development.  
when we execute the curl command with http request the elastic search queries are getting executed. Why we tried with https was the from the webserver the request is coming by default as https not http.we are trying to understand why it's sending it as https .

As you mentioned earlier Elasticsearch out of the box only uses HTTP without any encryption so i understand that we should send the execute the elastic search query using http.

So do you mean that we should not call elasticsearch queries directly by http [requests.by](http://requests.by) this -"you should not expose Elasticsearch directly to the internet, in case you are doing this at the moment."

---

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [July 28, 2016, 3:55pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/6 "2016-07-28T15:55:13Z")

</div>

Request:  
[https://147.117.52.29:9200/?hello=elasticsearch](https://147.117.52.29:9200/?hello=elasticsearch)

ERROR:

" elasticsearch.js:53072:5  
ERROR: 2016-07-28T14:55:30Z  
[31]\</Log.prototype.error@[https://xxxx.xx.xx.am.xxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:52758:56](https://xxxx.xx.xx.am.xxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:52758:56)  
checkRespForFailure@[https://xxxxx.xx.xx.am.xxxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:53533:9](https://xxxxx.xx.xx.am.xxxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:53533:9)  
[28]\</XhrConnector.prototype.request/xhr.onreadystatechange@[https://xxxxx.xx.xx.xx.xxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:52118:7](https://xxxxx.xx.xx.xx.xxxx.se/LogMgmt/apache-tomcat-7.0.67/webapps/LogMgmt/elasticsearch-js/elasticsearch.js:52118:7)

This is the request and error thrown.

---

<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:** [July 5, 2017, 10:32pm UTC](https://discuss.elastic.co/t/regarding-executing-https-elastic-search-queries/53008/7 "2017-07-05T22:32:01Z")

</div>


