ES Hadoop exception Unsupported/Unknown Elasticsearch version 5.2.2


(ganeshbabu) #1

Hi All,

I am trying to load data to ElasticSearch in local using "JavaEsSpark.saveToEs" method. and I am using Elasticsearch version 5.2.2

Below is the exception where thrown,

17/03/28 16:33:30 INFO Version: Elasticsearch Hadoop v2.4.4 [bb73bdf9b9]
17/03/28 16:33:31 ERROR Executor: Exception in task 0.0 in stage 1.0 (TID 1)
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.rest.RestService.createWriter(RestService.java:379)
at org.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:40)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:84)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:84)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:88)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Unsupported/Unknown Elasticsearch version 5.2.2
at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:191)
... 10 more

Please share your thoughts on this issue..

Regards,
Ganeshbabu R


(James Baiera) #2

The logs indicate that you are using ES-Hadoop 2.4.4 which is incompatible with Elasticsearch 5.2.2. You will need to update to ES-Hadoop 5.2.2.


(Minerva) #3

Thanks!

This has been of great help in identifying my problem too.


(ganeshbabu) #4

@james.baiera

Thnx I couldn't able to fix it up that time and yesterday only i get a chance to look into the issue and able to resolve it.

<dependency>
    		<groupId>org.elasticsearch</groupId>
    		<artifactId>elasticsearch-spark-13_2.10</artifactId>
    		<version>5.2.2</version>
</dependency>

(system) #5

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