# Elasticsearch for Hadoop issue

**URL:** https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [July 29, 2017, 6:32pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046 "2017-07-29T18:32:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [July 29, 2017, 6:32pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/1 "2017-07-29T18:32:54Z")

</div>

I had fixed the issue of inserting into the Elasticsearch table by copying the  
elasticsearch-hadoop-5.5.0.jar to the the $HIVE\_HOME/lib folder but now I am having the same issue while selecting from the table , what could be the issue ?

> 0: jdbc:hive2://hadoop2:10000/default\> list jar;  
> +------------------------------------------------------------------------------------------+--+  
> | /tmp/99fbb7fd-d0e8-4bef-8d28-761004cd559d\_resources/elasticsearch-hadoop-5.5.0.jar |  
> | /usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar |  
> | /tmp/99fbb7fd-d0e8-4bef-8d28-761004cd559d\_resources/elasticsearch-hadoop-hive-5.5.1.jar |  
> +------------------------------------------------------------------------------------------+--+  
> 3 rows selected (0.004 seconds)  
> 0: jdbc:hive2://hadoop2:10000/default\>  
> 0: jdbc:hive2://hadoop2:10000/default\>  
> 0: jdbc:hive2://hadoop2:10000/default\> select txn\_process\_date from pa\_lane\_txn\_es;  
> Error: java.io.IOException: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Unsupported/Unknown Elasticsearch version 5.5.0 (state=,code=0)  
> 0: jdbc:hive2://hadoop2:10000/default\>  
> 0: jdbc:hive2://hadoop2:10000/default\>

---

<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: [July 31, 2017, 4:39am UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/2 "2017-07-31T04:39:24Z")

</div>

@aliyesami I would avoid adding multiple versions of ES-Hadoop to your classpath. There is code that checks that there are not multiple versions of the library on the classpath and will throw exceptions if multiple are detected. I would use only one of the ES-Hadoop jars at a time.

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [July 31, 2017, 11:38am UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/3 "2017-07-31T11:38:24Z")

</div>

still the same issue . I only have one jar registered

> [root@hadoop1 ~]# echo $CLASSPATH  
> /usr/hdp/2.5.3.0-37/flume/lib/\*  
> [root@hadoop1 ~]#  
> [root@hadoop1 ~]# beeline -u 'jdbc:hive2://hadoop2:10000/default;principal=hive/hadoop2@TOLLS.DOT.STATE.FL.US'  
> Connecting to jdbc:hive2://hadoop2:10000/default;principal=hive/hadoop2@TOLLS.DOT.STATE.FL.US  
> 17/07/31 07:36:06 [TGT Renewer for [sami@TOLLS.DOT.STATE.FL.US](mailto:sami@TOLLS.DOT.STATE.FL.US)]: WARN security.UserGroupInformation: Exception encountered while running the renewal command. Aborting renew thread. ExitCodeException exitCode=1: kinit: Ticket expired while renewing credentials
> 
> Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37)  
> Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37)  
> Transaction isolation: TRANSACTION\_REPEATABLE\_READ  
> Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive  
> 0: jdbc:hive2://hadoop2:10000/default\> add JAR hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar;  
> INFO : converting to local hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar  
> INFO : Added [/tmp/7940dec9-b87c-4ed6-8cf3-b4d8e73ab8d0\_resources/elasticsearch-hadoop-5.5.0.jar] to class path  
> INFO : Added resources: [hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar]  
> No rows affected (0.094 seconds)  
> 0: jdbc:hive2://hadoop2:10000/default\> add jar /usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar;  
> INFO : Added [/usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar] to class path  
> INFO : Added resources: [/usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar]  
> No rows affected (0.002 seconds)  
> 0: jdbc:hive2://hadoop2:10000/default\> select \* from pa\_lane\_txn\_es limit 10;  
> Error: java.io.IOException: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Unsupported/Unknown Elasticsearch version 5.5.0 (state=,code=0)  
> 0: jdbc:hive2://hadoop2:10000/default\> QUIT  
> 0: jdbc:hive2://hadoop2:10000/default\> [root@hadoop1 ~]#  
> [root@hadoop1 ~]# ls /usr/hdp/2.5.3.0-37/hive/lib/elasticsearch-hadoop\*  
> /usr/hdp/2.5.3.0-37/hive/lib/elasticsearch-hadoop-5.5.0.jar  
> [root@hadoop1 ~]#  
> [root@hadoop1 ~

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [July 31, 2017, 12:57pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/4 "2017-07-31T12:57:45Z")

</div>

also if its a jar issue why am I able to insert into this elastic table fine and it populates the index properly but just can't select from it?

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [July 31, 2017, 1:42pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/5 "2017-07-31T13:42:26Z")

</div>

if I connect as hive and not beeline , I get slightly different error

> hive\> list jar;  
> hive\> add JAR hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar;  
> converting to local hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar  
> Added [/tmp/71fb60b9-b319-4edf-b8ae-cba6fc675e1c\_resources/elasticsearch-hadoop-5.5.0.jar] to class path  
> Added resources: [hdfs:///tmp/elasticsearch-hadoop-5.5.0.jar]  
> hive\> add jar /usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar;  
> Added [/usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar] to class path  
> Added resources: [/usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar]  
> hive\> list jar;  
> /usr/hdp/current/hive-client/lib/commons-httpclient-3.0.1.jar  
> /tmp/71fb60b9-b319-4edf-b8ae-cba6fc675e1c\_resources/elasticsearch-hadoop-5.5.0.jar  
> hive\>  
> \> select \* from pa\_lane\_txn\_es limit 10;  
> FAILED: 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'  
> hive\>

---

<div class="post-metadata">

### Author: ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)
#### Post date: [July 31, 2017, 3:20pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/6 "2017-07-31T15:20:32Z")

</div>

ok this issue is resolved by using hive and having just one jar registered, beeline still is giving error but I can continue .  
thanks for your help

---

<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: [August 28, 2017, 3:20pm UTC](https://discuss.elastic.co/t/elasticsearch-for-hadoop-issue/95046/7 "2017-08-28T15:20:55Z")

</div>

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