# Hive - Elasticsearch: Cannot detect ES version

**URL:** <https://discuss.elastic.co/t/hive-elasticsearch-cannot-detect-es-version/83899>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [April 27, 2017, 4:12pm UTC](https://discuss.elastic.co/t/hive-elasticsearch-cannot-detect-es-version/83899 "2017-04-27T16:12:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robh245](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@robh245](https://discuss.elastic.co/u/robh245)\
**Post date:** [April 27, 2017, 4:12pm UTC](https://discuss.elastic.co/t/hive-elasticsearch-cannot-detect-es-version/83899/1 "2017-04-27T16:12:44Z")

</div>

Hi  
I am having issues creating an external table in Hive to connect with Elasticsearch. I am using version 1.2.1000.2.4.2. of Hive and 5.3.1 of Elasticsearch.

Below is the hive query I am running:

CREATE EXTERNAL TABLE sts\_lat\_lon\_avg\_elastic\_0426  
(asof\_yyyymm int,  
outlet\_state string,  
bus\_in int,  
lat\_num decimal(9,6),  
lon\_num decimal(9,6),  
avg\_accts\_per\_tm decimal(12,2))  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'  
TBLPROPERTIES( 'es.nodes.wan.only' = 'true', 'es.resource' = 'lat\_lon','es.index.auto.create' = 'false');

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'

I have confirmed that the port is open and the host is accessible by all nodes in the cluster. I have also tried specifying the hostname and port in the TBLPROPERTIES field as well as modifying the config file in ES to specify the ip address and port 9200 for the host as well.

If anyone has had similar issues or has any suggestions, I would greatly appreciate any feedback. Thanks!

---

<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:** [May 25, 2017, 4:16pm UTC](https://discuss.elastic.co/t/hive-elasticsearch-cannot-detect-es-version/83899/2 "2017-05-25T16:16:19Z")

</div>

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