Regarding executing https elastic search queries

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.

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

--Alex

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'

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.

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 this -"you should not expose Elasticsearch directly to the internet, in case you are doing this at the moment."

Request:
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
checkRespForFailure@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

This is the request and error thrown.