# EShadoopconnector connection to HTTPS instead of HTTP

**URL:** https://discuss.elastic.co/t/eshadoopconnector-connection-to-https-instead-of-http/66282
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [November 16, 2016, 6:08pm UTC](https://discuss.elastic.co/t/eshadoopconnector-connection-to-https-instead-of-http/66282 "2016-11-16T18:08:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Praveen5](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@Praveen5](https://discuss.elastic.co/u/Praveen5)
#### Post date: [November 16, 2016, 6:08pm UTC](https://discuss.elastic.co/t/eshadoopconnector-connection-to-https-instead-of-http/66282/1 "2016-11-16T18:08:45Z")

</div>

HI Team,

Is there a way we can use the ES-Hadoop connector to query using https.

I tried to query the elastic search using the below configurations  
sparkConf.set(ConfigurationOptions.ES\_NET\_PROXY\_HTTPS\_HOST, var\_elastic\_ip)  
sparkConf.set(ConfigurationOptions.ES\_PORT, var\_elastic\_port)  
sparkConf.set(ConfigurationOptions.ES\_RESOURCE, var\_ES\_Index\_Type)  
sparkConf.set(ConfigurationOptions.ES\_QUERY, var\_ES\_Query\_String)  
sparkConf.set(ConfigurationOptions.ES\_NET\_PROXY\_HTTPS\_USER, var\_ES\_user)  
sparkConf.set(ConfigurationOptions.ES\_NET\_PROXY\_HTTPS\_PASS, var\_ES\_pass)  
sparkConf.set(ConfigurationOptions.ES\_NET\_SSL\_PROTOCOL, "SSL")  
:  
:  
:  
val var\_Read\_Data\_From\_ES\_RDD = EsSpark.esJsonRDD(sc)

but it is throwing the below error:  
16/11/16 16:59:49 DEBUG HttpMethodBase: Default charset used: UTF-8  
16/11/16 16:59:49 TRACE CommonsHttpTransport: Rx @[X.X.X.X] [400-Bad Request] [

400 The plain HTTP request was sent to HTTPS port
# 400 Bad Request
The plain HTTP request was sent to HTTPS port
* * *
nginx/1.4.6 (Ubuntu) ] 16/11/16 16:59:49 DEBUG HttpMethodBase: re-creating response stream from byte array 16/11/16 16:59:49 DEBUG HttpMethodBase: re-creating response stream from byte array 16/11/16 16:59:49 DEBUG HttpMethodBase: re-creating response stream from byte array 16/11/16 16:59:49 TRACE CommonsHttpTransport: Closing HTTP transport to X.X.X.X:9200 16/11/16 16:59:49 TRACE HttpConnection: enter HttpConnection.close() 16/11/16 16:59:49 TRACE HttpConnection: enter HttpConnection.closeSockedAndStreams() Exception in thread "main" org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot detect ES version - typically this happens if the network/Elasticsearch cluster is not accessible or when targeting a WAN/Cloud instance without the proper setting 'es.nodes.wan.only' at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:190) at org.elasticsearch.hadoop.rest.RestService.findPartitions(RestService.java:231)

---

<div class="post-metadata">

### Author: ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)
#### Post date: [November 18, 2016, 5:19pm UTC](https://discuss.elastic.co/t/eshadoopconnector-connection-to-https-instead-of-http/66282/2 "2016-11-18T17:19:19Z")

</div>

Is `es.net.ssl` enabled currently? If that option is not enabled the connector ignores any SSL settings and communicates without SSL.

---

<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: [December 16, 2016, 5:19pm UTC](https://discuss.elastic.co/t/eshadoopconnector-connection-to-https-instead-of-http/66282/3 "2016-12-16T17:19:19Z")

</div>

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