returned [400|Bad Request:]

Hi, there

When I tried read index from Spark, found error.

py4j.protocol.Py4JJavaError: An error occurred while calling o35.load.
: [HEAD] on [projects/project] failed; server[] returned [400|Bad Request:]


  • Fedora 26
  • JDK 1.8.0-141
  • Spark 2.2.0
  • Elasticsearch 5.5.1

Here is code snipet.

from pyspark.sql import SparkSession
spark = SparkSession \
    .builder \
    .appName("myapp") \
    .config("es.nodes", "") \
df ="org.elasticsearch.spark.sql").load("projects/project")

run like this.

$ ~/spark/bin/spark-submit --packages org.elasticsearch:elasticsearch-spark-20_2.11:5.3.1 ./

Any advice is welcome.

@m-kiuchi This is fixed in ES-Hadoop v5.5.0. Please upgrade to that version in order to interact with ES 5.5.0+.

1 Like

@james.baiera Thanks much. I've succeed to read from elasticsearch !

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