# Unable to connect to ES in MapR MEP3 while able in MapR Mep2

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-es-in-mapr-mep3-while-able-in-mapr-mep2/83100>\
**Category:** Elasticsearch\
**Created:** [April 20, 2017, 6:25pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-es-in-mapr-mep3-while-able-in-mapr-mep2/83100 "2017-04-20T18:25:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Min\_Qiu](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@Min\_Qiu](https://discuss.elastic.co/u/Min_Qiu)\
**Post date:** [April 20, 2017, 6:25pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-es-in-mapr-mep3-while-able-in-mapr-mep2/83100/1 "2017-04-20T18:25:46Z")

</div>

We have a MapR env which MEP2.0 with spark 2.0.1 , let's call EVC2  
We have a MapR env which MEP2.0 with spark 2.1.0 , let's call EVC3

we have a spark streaming application, when run in EVC2 it works to use EsSpark to write to ES,

while run the same application (with dependency change on the spark to version 2.1 but the elasticsearch-spark-20\_5.2.2 keeps the same) to write to the same ES which is in AWS in EVC3, it alwasy fail with the following error even we set the configuration the same as in EVC2 which is

--conf spark.es.net.http.auth.user=XXXX --conf spark.es.net.http.auth.pass=XXXX --conf spark.es.nodes=XXXX --conf spark.es.port=9200 --conf spark.es.nodes.wan.only=true --conf spark.es.net.ssl=true --conf spark.streaming.kafka.consumer.poll.ms=4196

The error is

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:250)  
at org.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:546)  
at org.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:58)  
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:102)  
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$doSaveToEs$1.apply(EsSpark.scala:102)  
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:70)  
at org.apache.spark.scheduler.Task.run(Task.scala:86)  
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:274)  
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.rest.EsHadoopTransportException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:124)  
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:444)  
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:424)  
at org.elasticsearch.hadoop.rest.RestClient.execute(RestClient.java:428)  
at org.elasticsearch.hadoop.rest.RestClient.get(RestClient.java:154)  
at org.elasticsearch.hadoop.rest.RestClient.remoteEsVersion(RestClient.java:609)  
at org.elasticsearch.hadoop.rest.InitializationUtils.discoverEsVersion(InitializationUtils.java:243)  
... 10 more  
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)  
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)  
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)  
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)  
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)  
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)  
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)  
at sun.security.ssl.Handshaker.process\_record(Handshaker.java:961)  
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)  
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)  
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)  
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)  
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)  
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)  
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)  
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)  
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)  
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)  
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)  
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)  
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)  
at org.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport.execute(CommonsHttpTransport.java:471)  
at org.elasticsearch.hadoop.rest.NetworkClient.execute(NetworkClient.java:112)  
... 16 more  
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)  
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)  
at sun.security.validator.Validator.validate(Validator.java:260)  
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)  
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)  
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)  
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496)  
... 34 more  
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)  
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)  
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)  
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)  
... 40 more

we then installed MapR MEP 3 with spark 2.0.1 but get the same error.

Does anybody have a clue?

Thanks

---

<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:** [May 18, 2017, 6:37pm UTC](https://discuss.elastic.co/t/unable-to-connect-to-es-in-mapr-mep3-while-able-in-mapr-mep2/83100/2 "2017-05-18T18:37:25Z")

</div>

Closed on May 18, 2017, 6:37pm UTC

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