Hi All, I was trying out spark + SalesforceLibabry on cloudera 5.9 I am having SSL handhshake issue please check out my question on stack over flow no one answered.
The library works ok on windows it fails when I try to run on cloudera edge node. https://stackoverflow.com/questions/47820372/ssl-handshake-issue-on-cloudera-5-9 Did anyone tried out these spark + salesforce library ( https://github.com/springml/spark-salesforce) + (https://github.com/springml/salesforce-wave-api). I am trying to use sales force wave api library (https://github.com/springml/salesforce-wave-api) in cloudera cluster 5.9 to get data, I have to use proxy because from our cluster its the only way to communicate outside world. So I made changes to the library to take proxy host and port to communicate below are the place where I made changes. Change 1:- config.setProxy("myenterpiseproxy server",port); https://github.com/springml/salesforce-wave-api/blob/0ac76aeb2221d9e7038229fd352a8694e8cde7e9/src/main/java/com/springml/salesforce/wave/util/SFConfig.java#L101 Change 2:- HttpHost proxy = new HttpHost("myenterpiseproxy server", port, "http"); https://github.com/springml/salesforce-wave-api/blob/0ac76aeb2221d9e7038229fd352a8694e8cde7e9/src/main/java/com/springml/salesforce/wave/util/HTTPHelper.java#L127 Change 3:- RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout) .setConnectTimeout(timeout).setConnectionRequestTimeout(timeout).setProxy(proxy).build(); https://github.com/springml/salesforce-wave-api/blob/0ac76aeb2221d9e7038229fd352a8694e8cde7e9/src/main/java/com/springml/salesforce/wave/util/HTTPHelper.java#L129 I built an application to use salesforce wave api as dependency and I tried to execute the Jar I am getting SSL handshake issue. I passed in javax.net.ssl.truststore,javax.net.ssl.keyStore,https.protocols of my cluster still having problems. Did anyone had similar issue ? did anyone tried to use this library in cloudera cluster ? Run Book:- java -cp httpclient-4.5.jar:SFWaveApiTest-1.0-SNAPSHOT-jar-with-dependencies.jar com.az.sfget.SFGetTest "username" "passwordwithtoken" "https://test.salesforce.com/services/Soap/u/35" "select id,OWNERID from someobject" "enterpiseproxyhost" "9400" "TLSv1.1,TLSv1.2" "/usr/java/jdk1.7.0_67-cloudera/jre/lib/security/jssecacerts" "/opt/cloudera/security/jks/uscvlpcldra-keystore.jks" Error:- javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:946) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:388) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at com.springml.salesforce.wave.util.HTTPHelper.execute(HTTPHelper.java:122) at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:88) at com.springml.salesforce.wave.util.HTTPHelper.get(HTTPHelper.java:92) at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:120) at com.springml.salesforce.wave.impl.ForceAPIImpl.query(ForceAPIImpl.java:36) at com.az.sfget.SFGetTest.main(SFGetTest.java:54) Caused by: java.io.EOFException: SSL peer shut down incorrectly at sun.security.ssl.InputRecord.read(InputRecord.java:482) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927) ... 21 more Thanks Sri -- Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/ --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org