# 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'

**URL:** <https://discuss.elastic.co/t/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/136655>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [June 20, 2018, 9:30am UTC](https://discuss.elastic.co/t/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/136655 "2018-06-20T09:30:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sricharan\_Gadde](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sricharan\_Gadde](https://discuss.elastic.co/u/Sricharan_Gadde)\
**Post date:** [June 20, 2018, 9:30am UTC](https://discuss.elastic.co/t/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/136655/1 "2018-06-20T09:30:12Z")

</div>

I hosted ElasticSearch on **Azure** and connecting to the Hive to load data into elastic search.

I am doing steps as follows

add jar adl://stepoc.azuredatalakestore.net/ES-Hadoop-Jars/elasticsearch-hadoop-6.3.0.jar;  
add jar adl://stepoc.azuredatalakestore.net/ES-Hadoop-Jars/elasticsearch-hadoop-hive-6.3.0.jar;

CREATE EXTERNAL TABLE IF NOT EXISTS Reliance\_Processed\_ES  
(  
formId INT,  
formName STRING,  
updatedAt STRING  
)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource'='reliance/data', 'es.nodes'='X.X.X.X', 'es.port'='9200', 'es.nodes.wan.only'='true');

I am getting following error.

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. 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'

Note:  
Firewalls are turned off.

---

<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:** [June 21, 2018, 12:22am UTC](https://discuss.elastic.co/t/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/136655/2 "2018-06-21T00:22:51Z")

</div>

First, make sure that ONLY ONE of those jars are added. The first one there includes all integrations, and the second one includes only the hive integration code + the core code. Adding both will trip up internal checks for only one jar on the classpath.

Secondly, this exception is a fairly high level exception. Can you include the exception text from the Hive server logs?

---

<div class="post-metadata">

**Author:** ![Sricharan\_Gadde](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sricharan\_Gadde](https://discuss.elastic.co/u/Sricharan_Gadde)\
**Post date:** [June 21, 2018, 6:14am UTC](https://discuss.elastic.co/t/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/136655/3 "2018-06-21T06:14:16Z")

</div>

I have attached the log file in the following link, this log is after adding only one required hive jar.

[Link for Log](https://drive.google.com/file/d/10Z4KFhwd5I-jwWFLwQHNYLST6h5-UIKJ/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Sricharan\_Gadde](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Sricharan\_Gadde](https://discuss.elastic.co/u/Sricharan_Gadde)\
**Post date:** [June 21, 2018, 9:53am UTC](https://discuss.elastic.co/t/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/136655/4 "2018-06-21T09:53:06Z")

</div>

updated queries which I am running are below.

add jar adl://stepoc.azuredatalakestore.net/ES-Hadoop-Jars/elasticsearch-hadoop-hive-6.3.0.jar;  
CREATE EXTERNAL TABLE IF NOT EXISTS Reliance\_Processed\_ES  
(  
formId INT,  
formName STRING,  
updatedAt STRING  
)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource'='reliance/data', 'es.nodes'='x.x.x.x', 'es.port'='9200', 'es.nodes.wan.only'='true','es.net.http.auth.user'='sampleuser','es.net.http.auth.pass'='samplepassword','es.nodes.discovery'='true');

INSERT OVERWRITE TABLE Reliance\_Processed\_ES select \* from Reliance\_Processed;

Note:  
#Not even able to access local instance of Elasticsearch.  
#Firewalls are turned off too.

---

<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:** [June 25, 2018, 3:27pm UTC](https://discuss.elastic.co/t/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/136655/5 "2018-06-25T15:27:24Z")

</div>

This seems like an issue with how your cloud network is configured, especially if it cannot even communicate with the local Elasticsearch instance. HiveServer should produce more logs as to why the operation has failed, but based on these logs alone, there is not enough information to identify what is wrong. I would manually check to make sure that HiveServer as well as every executor node is able to reach your Elasticsearch nodes at their published HTTP addresses, as detailed in their node info output `curl -X GET localhost:9200/_nodes/http`

---

<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 23, 2018, 3:27pm UTC](https://discuss.elastic.co/t/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/136655/6 "2018-07-23T15:27:25Z")

</div>

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