# Unable to connect with elasticsearch from hive

**URL:** <https://discuss.elastic.co/t/unable-to-connect-with-elasticsearch-from-hive/89697>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [June 16, 2017, 11:36am UTC](https://discuss.elastic.co/t/unable-to-connect-with-elasticsearch-from-hive/89697 "2017-06-16T11:36:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leenanarmeta](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@leenanarmeta](https://discuss.elastic.co/u/leenanarmeta)\
**Post date:** [June 16, 2017, 11:36am UTC](https://discuss.elastic.co/t/unable-to-connect-with-elasticsearch-from-hive/89697/1 "2017-06-16T11:36:58Z")

</div>

hi, iam trying to connect with elasticsearch to send the data from hive tables...  
i added elastic-hadoop jar in hive working directory..

while creating hive tables iam gettinng error like ...could you tell possible solution for that

hive\> CREATE EXTERNAL TABLE artists ( City String,State String,Join\_date date,Salary double,Sex String,Age INT,Emp\_Name String,Dno INT) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'radio/artists','es.index.auto.create' = 'true','es.nodes.wan.only'='false','es.nodes'='10.80.15.90:9200');  
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'

---

<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 16, 2017, 1:50pm UTC](https://discuss.elastic.co/t/unable-to-connect-with-elasticsearch-from-hive/89697/2 "2017-06-16T13:50:04Z")

</div>

This typically happens if Hive cannot reach Elasticsearch. If you open up the HiveServer logs you should be able to find the full stack trace and see the root cause.

---

<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 14, 2017, 1:50pm UTC](https://discuss.elastic.co/t/unable-to-connect-with-elasticsearch-from-hive/89697/3 "2017-07-14T13:50:23Z")

</div>

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