One Star

tHTTPRequest : PKIX path building failed

Hi,
i'm trying to connect to my server using tHTTPRequest
attach is the set up. i didn't forget the URI it's just for the screen shot.
here is the error i got:
Starting job GET_DM_DATA at 13:13 13/10/2013.

connecting to socket on port 3859
connected
2013-10-13 13:13:08|nwZxV5|nwZxV5|nwZxV5|21528|SALESFORCE|GET_DM_DATA|_lB4wkBCIEeO1t5vCWPAWSw|0.1|Default||begin||
Exception in component tHttpRequest_1
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(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2013-10-13 13:13:10|nwZxV5|nwZxV5|nwZxV5|SALESFORCE|GET_DM_DATA|Default|6|Java Exception|tHttpRequest_1|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|1
2013-10-13 13:13:10|nwZxV5|nwZxV5|nwZxV5|21528|SALESFORCE|GET_DM_DATA|_lB4wkBCIEeO1t5vCWPAWSw|0.1|Default||end|failure|1703
disconnected
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at salesforce.get_dm_data_0_1.GET_DM_DATA.tHttpRequest_1Process(GET_DM_DATA.java:541)
at salesforce.get_dm_data_0_1.GET_DM_DATA.runJobInTOS(GET_DM_DATA.java:2133)
at salesforce.get_dm_data_0_1.GET_DM_DATA.main(GET_DM_DATA.java:1994)
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(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 14 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 20 more
Job GET_DM_DATA ended at 13:13 13/10/2013.
i'm using version 5.2.1
using the same papameters i was able to run it in Mozila browser using rest client add on.
Any clue?
Thanks
Shahar
11 REPLIES
Moderator

Re: tHTTPRequest : PKIX path building failed

Hi,
It seems your server require HTTPS POST?
Please see this related article http://stackoverflow.com/questions/6908948/java-sun-security-provider-certpath-suncertpathbuilderexc....
Are you able to successfully import the certificate? By tSetKeystore component?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tHTTPRequest : PKIX path building failed

HI,
i wan't able to enable the keystore. i'm not a java expert Smiley Sad .
anything else i can do here?
Thanks
Moderator

Re: tHTTPRequest : PKIX path building failed

Hi,
Does the component tFileFetch meet your needs. It supports HTTPS connections, you can set authentication in the advanced settings panel of component.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tHTTPRequest : PKIX path building failed

I tried it, i got different problem on different topic:
http://www.talendforge.org/forum/viewtopic.php?pid=119380#p119380
Thanks !
Shahar
One Star

Re: tHTTPRequest : PKIX path building failed

Hello,
I'm attempting to run a GET request via HTTPS using tHttpRequest. Was running into all kinds of errors as mentioned in the forums so I: added in tSetKeystore, setup a new TrustStore & KeyStore (http://www.techbrainwave.com/?p=953), imported the certificate from the server I'm attempting to connect to, learned a heck of a lot along the way, but still get the following error:
{code}Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target{/code}
* not able to use POST (server limitation)
* cannot use tFileFetch (server limitation)
* headers (authentication/content-type/etc) are correct as validated with another tool
Any ideas? I'm stumped (I'm also not a java dev so..)..
One Star

Re: tHTTPRequest : PKIX path building failed

Hi all,
I've encountered the same problem.
Does someone have the solution ?
Thank you in advance !
Regards,
One Star

Re: tHTTPRequest : PKIX path building failed

i have the same problem.
Moderator

Re: tHTTPRequest : PKIX path building failed

Hi ssalvatierra,
The job should be OK if you have tested  tsend mail with gmail.

Did your company Inbox server require certification?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tHTTPRequest : PKIX path building failed

Hi,
i'm trying to connect to my server using tHTTPRequest
attach is the set up. i didn't forget the URI it's just for the screen shot.
here is the error i got:
Starting job GET_DM_DATA at 13:13 13/10/2013.

connecting to socket on port 3859
connected
2013-10-13 13:13:08|nwZxV5|nwZxV5|nwZxV5|21528|SALESFORCE|GET_DM_DATA|_lB4wkBCIEeO1t5vCWPAWSw|0.1|Default||begin||
Exception in component tHttpRequest_1
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(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
2013-10-13 13:13:10|nwZxV5|nwZxV5|nwZxV5|SALESFORCE|GET_DM_DATA|Default|6|Java Exception|tHttpRequest_1|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|1
2013-10-13 13:13:10|nwZxV5|nwZxV5|nwZxV5|21528|SALESFORCE|GET_DM_DATA|_lB4wkBCIEeO1t5vCWPAWSw|0.1|Default||end|failure|1703
disconnected
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at salesforce.get_dm_data_0_1.GET_DM_DATA.tHttpRequest_1Process(GET_DM_DATA.java:541)
at salesforce.get_dm_data_0_1.GET_DM_DATA.runJobInTOS(GET_DM_DATA.java:2133)
at salesforce.get_dm_data_0_1.GET_DM_DATA.main(GET_DM_DATA.java:1994)
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(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 14 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 20 more
Job GET_DM_DATA ended at 13:13 13/10/2013.
i'm using version 5.2.1
using the same papameters i was able to run it in Mozila browser using rest client add on.
Any clue?
Thanks
Shahar

I am also Facing the same issue .Did you resolved the issue. 
Moderator

Re: tHTTPRequest : PKIX path building failed

Hi sukumar.c,
Have you already checked  your server certificate? What's java version you are using?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: tHTTPRequest : PKIX path building failed

Please help me with below issue
Hello! Could someone help me?,
I'm new in Talend and I'm trying to run a job and get below error. I don't know which component is giving below error and why it is giving error. so somebody please help me.
please find attached snapshot.
See the complete error:
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Received fatal alert: internal_error
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Received fatal alert: internal_error
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Received fatal alert: internal_error
Mar 02, 2017 4:08:50 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
There isContinue_tFileFetch_1 an exception on:
javax.net.ssl.SSLException: Received fatal alert: internal_error
      at sun.security.ssl.Alerts.getSSLException(Unknown Source)
      at sun.security.ssl.Alerts.getSSLException(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
      at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
      at sun.security.ssl.AppOutputStream.write(Unknown Source)
      at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
      at java.io.BufferedOutputStream.flush(Unknown Source)
      at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:827)
      at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1975)
      at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
      at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.tFileFetch_1Process(Reliant_New_Monthend_API.java:4461)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.tMysqlInput_2Process(Reliant_New_Monthend_API.java:3857)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.tMysqlInput_1Process(Reliant_New_Monthend_API.java:3508)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.tMysqlConnection_1Process(Reliant_New_Monthend_API.java:3214)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.tSetGlobalVar_1Process(Reliant_New_Monthend_API.java:3087)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.runJobInTOS(Reliant_New_Monthend_API.java:12153)
      at dashbay2011.reliant_new_monthend_api_0_1.Reliant_New_Monthend_API.main(Reliant_New_Monthend_API.java:11838)