Skip to content

Error writing to ES from Spark via REST #939

@kumarlalapet

Description

@kumarlalapet

OS: : Red Hat Enterprise Linux Server release 6.8 (Santiago)
JVM : Open JDK 1.8
Hadoop/Spark: 1.6.1
ES-Hadoop : 5.0.0
ES : 5.2.0

Three node es cluster is behind a load balancer. SSL communication to the load balancer from loadbalancer to es its NOT encrypted.

Loaded the cert file in the trust store in the jvm cacerts file. Provided this as an argument to the executors via the spark-submit command using -Djavax.net.ssl.trustStore option. Provided the following in the code

                ImmutableMap.Builder builder = configBuilder.put(ConfigurationOptions.ES_NODES,esNodes) // es nodes
                        .put(ConfigurationOptions.ES_PORT,esPort) //9200
                        .put(ConfigurationOptions.ES_NET_USE_SSL,"true")
                        .put(ConfigurationOptions.ES_NET_PROXY_HTTPS_HOST,esProxy) //load balancer 
                        .put(ConfigurationOptions.ES_NET_PROXY_HTTPS_PORT,esProxyPort); //LB port

However getting error as below

org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed

I tried various other options. But nothing worked.

NOTE

  1. when I call the url via the browser it works
  2. wrote a simple java program using elastic rest client that also works in the same jvm

Need help. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions