# While executing the spark Job in cluster mode Cannot detect ES version hosted by AWS

**URL:** <https://discuss.elastic.co/t/while-executing-the-spark-job-in-cluster-mode-cannot-detect-es-version-hosted-by-aws/164570>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [January 17, 2019, 5:08am UTC](https://discuss.elastic.co/t/while-executing-the-spark-job-in-cluster-mode-cannot-detect-es-version-hosted-by-aws/164570 "2019-01-17T05:08:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinodanumarla](https://avatars.discourse-cdn.com/v4/letter/v/a698b9/32.png) [@vinodanumarla](https://discuss.elastic.co/u/vinodanumarla)\
**Post date:** [January 17, 2019, 5:08am UTC](https://discuss.elastic.co/t/while-executing-the-spark-job-in-cluster-mode-cannot-detect-es-version-hosted-by-aws/164570/1 "2019-01-17T05:08:55Z")

</div>

While I am executing a spark job to load data from Json to ES cluster hosted by AWS using cluster mode with the below mentioned configuration settings getting error as

Error :- "py4j.protocol.Py4JJavaError: An error occurred while calling o2519.save.  
: 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' "

Configuration settings : -  
DataFrame.write.format("org.elasticsearch.spark.sql")   
.option("es.nodes.wan.only", "true")   
.option("es.port", "443")   
.option("es.net.ssl", "true")   
.option("es.net.ssl.cert.allow.self.signed", "true")   
.option("es.nodes", "[ssssss.us-east-2.es.amazonaws.com](http://ssssss.us-east-2.es.amazonaws.com)")   
.option("es.mapping.id", "doc\_id")   
.mode("append")   
.save("index/type")

Though I mentioned "es.nodes.wan.only", "true" it is getting ignored in execution time. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 17, 2019, 5:26am UTC](https://discuss.elastic.co/t/while-executing-the-spark-job-in-cluster-mode-cannot-detect-es-version-hosted-by-aws/164570/2 "2019-01-17T05:26:31Z")

</div>

This might be a limitation of the AWS service, as they don't offer all of the Elasticsearch API's or functionality.

You may need to also ask them.

---

<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:** [February 14, 2019, 5:26am UTC](https://discuss.elastic.co/t/while-executing-the-spark-job-in-cluster-mode-cannot-detect-es-version-hosted-by-aws/164570/3 "2019-02-14T05:26:32Z")

</div>

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