# Not able to detect ES version

**URL:** <https://discuss.elastic.co/t/not-able-to-detect-es-version/142340>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [July 31, 2018, 10:37am UTC](https://discuss.elastic.co/t/not-able-to-detect-es-version/142340 "2018-07-31T10:37:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheryl](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sheryl](https://discuss.elastic.co/u/sheryl)\
**Post date:** [July 31, 2018, 10:37am UTC](https://discuss.elastic.co/t/not-able-to-detect-es-version/142340/1 "2018-07-31T10:37:05Z")

</div>

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'  
i am dumping dataframe to elastic search but i am not able to do it .

df.write.format("org.elasticsearch.spark.sql")  
.option("es.nodes.wan.only","true")  
.option("es.port","9200")  
.option("es.net.ssl","true")  
.option("es.nodes","localhost")  
.mode("append")  
.option("es.nodes.client.only", "false")  
.save("C:\elasticsearch-6.3.1")

---

<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:** [August 14, 2018, 3:55am UTC](https://discuss.elastic.co/t/not-able-to-detect-es-version/142340/2 "2018-08-14T03:55:58Z")

</div>

I see two items in your configuration that stand out to me. First: I see that you have `es.net.ssl` set to true. SSL/TLS encryption requires a licensed version of Elasticsearch, unless you are using a third party plugin that provides that encryption. Please make sure that you have SSL set up correctly, since if it is not configured right it will keep the connector from being able to reach Elasticsearch. You should be able to view more information about the connection failure in the logs. If you have SSL configured, usually that is paired with access controls. Make sure to add your credentials to the job, as described in the [docs](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#_basic_authentication).

While the log message suggests configuring the `es.nodes.wan.only` setting, it is a good idea to [be familiar with what that setting is doing](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#_network) in ES-Hadoop. That will disable node discovery and node filtering which generally is not advised unless you are running ES in the cloud.

After you sort out your connection issues, the second thing you will probably run into is that your elasticsearch index is not a valid index name:

> [@sheryl](#):
>
> .save("C:\elasticsearch-6.3.1")

That string is going to be used as the index in Elasticsearch to write data to. You will most likely want to change that setting to be something more appropriate for your index name.

---

<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:** [September 11, 2018, 3:56am UTC](https://discuss.elastic.co/t/not-able-to-detect-es-version/142340/3 "2018-09-11T03:56:00Z")

</div>

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