0

I have installed java,hadoop and flume in Ubuntu. When I run flume job to extract data from twitter I get error like below; Not sue the issue behind this.

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Relevant discussions can be found on the Internet at:
        http://www.google.co.jp/search?q=d0031b0b or
        http://www.google.co.jp/search?q=1db75522
TwitterException{exceptionCode=[d0031b0b-1db75522 db667dea-99334ae4 db667dea-99334ae4 db667dea-99334ae4], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}
        at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:192)
        at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
        at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:89)
        at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:176)
        at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:164)
        at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:462)
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:1509)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
        at twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:34)
        at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:156)
        ... 5 more
Alka
  • 267
  • 1
  • 9
  • So you've got a `SSLHandshakeException` because of `ValidatorException` with keywords "PKIX path" and "valid certification path" and you are too lazy to run a Google search. OK. Short story: you try to connect to a remote server using a secure SSL connection; the Java network library checks the server certificate; but it is not signed by a **public authority** (e.g. VeriSign) that is listed in the JRE system TrustStore; and you did not provide a **custom** TrustStore file; therefore Java refuses to connect to an insecure site *(could be a spoofing attack! oh my!)* – Samson Scharfrichter Aug 18 '16 at 14:07
  • Have a look at http://stackoverflow.com/questions/8935083/java-ssl-connection-using-truststore – Samson Scharfrichter Aug 18 '16 at 14:08

0 Answers0