# Hive ES Hadoop not finding ES cluster

**URL:** <https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [September 9, 2016, 4:16pm UTC](https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181 "2016-09-09T16:16:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darshanpandya](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@darshanpandya](https://discuss.elastic.co/u/darshanpandya)\
**Post date:** [September 9, 2016, 4:16pm UTC](https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181/1 "2016-09-09T16:16:16Z")

</div>

hello all,  
Elasticsearch cluster is different from hadoiop cluster and connectivity is tested between the data nodes and elastic search  
I am able to create a collection in ElasticSearch but I am not able to run a MapReduce job on the hadoop cluster which will index the data into elastic search.

I created a Hive table as  
CREATE EXTERNAL TABLE es\_datacatalogsearchindex (  
dataset\_id STRING,  
search\_string STRING)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'  
TBLPROPERTIES('es.resource' = 'datacatalogsearchindex/concatenatedRecord', 'es.nodes.wan.only' = 'true','es.node' = 'real IP address');

insert into es\_datacatalogsearchindex select \* from concatenated\_index limit 100;

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 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'

at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveRecordWriter(HiveFileFormatUtils.java:248)

at org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketForFileIdx(FileSinkOperator.java:570)

at org.apache.hadoop.hive.ql.exec.FileSinkOperator.createBucketFiles(FileSinkOperator.java:514)

... 13 more

Caused by: 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'

at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:196)

at org.elasticsearch.hadoop.hive.HiveUtils.init(HiveUtils.java:142)

at org.elasticsearch.hadoop.hive.EsHiveOutputFormat.getHiveRecordWriter(EsHiveOutputFormat.java:93)

at org.elasticsearch.hadoop.hive.EsHiveOutputFormat.getHiveRecordWriter(EsHiveOutputFormat.java:42)

at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getRecordWriter(HiveFileFormatUtils.java:260)

at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getHiveRecordWriter(HiveFileFormatUtils.java:245)

... 15 more

Caused by: org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried [[127.0.0.1:9200]]

at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:142)

at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:434)

at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:414)

at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:418)

at org.elasticsearch.hadoop.rest.RestClient.get(RestClient.java:122)

at org.elasticsearch.hadoop.rest.RestClient.esVersion(RestClient.java:564)

at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:184)

... 20 more

---

<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:** [September 14, 2016, 4:20pm UTC](https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181/2 "2016-09-14T16:20:46Z")

</div>

> [@darshanpandya](#):
>
> Caused by: org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried [[127.0.0.1:9200]]

This seems like the job doesn't have `es.nodes` set to anything, and is therefor defaulting to localhost.[quote="darshanpandya, post:1, topic:60181"]  
'es.node' = 'real IP address'  
[/quote]

Change this setting to `es.nodes` instead of `es.node`. Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![darshanpandya](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@darshanpandya](https://discuss.elastic.co/u/darshanpandya)\
**Post date:** [September 14, 2016, 9:34pm UTC](https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181/3 "2016-09-14T21:34:14Z")

</div>

Thanks James!

---

<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 6, 2017, 1:23pm UTC](https://discuss.elastic.co/t/hive-es-hadoop-not-finding-es-cluster/60181/4 "2017-07-06T13:23:12Z")

</div>


