javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors

Jenkins JIRA | Adam Gavish | 1 year ago
  1. 0

    When trying to work with Github enterprise and jenkins ghprb plugin, the webhook looks ok on github enterprise but in jenkins.log I see that there are exceptions that make the pull request trigger to fail. Also, my github enterprise server is based on an ssl certificate, maybe that's the problem? Jun 16, 2015 11:35:00 AM org.jenkinsci.plugins.ghprb.GhprbGitHubAuth getConnection SEVERE: Unable to connect using credentials: fab49720-e9f1-4fac-aad0-f4de321a6b42 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1672) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.handleApiError(Requester.java:482) at org.kohsuke.github.Requester._to(Requester.java:245) at org.kohsuke.github.Requester.to(Requester.java:191) at org.kohsuke.github.GitHub.getMyself(GitHub.java:261) at org.kohsuke.github.GitHub.<init>(GitHub.java:137) at org.kohsuke.github.GitHubBuilder.build(GitHubBuilder.java:195) at org.jenkinsci.plugins.ghprb.GhprbGitHubAuth.getConnection(GhprbGitHubAuth.java:118) at org.jenkinsci.plugins.ghprb.GhprbTrigger.getGitHub(GhprbTrigger.java:266) at org.jenkinsci.plugins.ghprb.GhprbGitHub.get(GhprbGitHub.java:23) at org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:61) at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:88) at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:134) at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:204) at hudson.triggers.Trigger.checkTriggers(Trigger.java:266) at hudson.triggers.Trigger$Cron.doRun(Trigger.java:215) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) at sun.security.ssl.Handshaker.process_record(Handshaker.java:837) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.parse(Requester.java:447) at org.kohsuke.github.Requester._to(Requester.java:224) ... 21 more Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:350) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:260) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) ... 35 more Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:208) at java.security.cert.CertPathValidator.validate(CertPathValidator.java:279) at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:345) ... 41 more

    Jenkins JIRA | 1 year ago | Adam Gavish
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
  2. 0

    When trying to work with Github enterprise and jenkins ghprb plugin, the webhook looks ok on github enterprise but in jenkins.log I see that there are exceptions that make the pull request trigger to fail. Also, my github enterprise server is based on an ssl certificate, maybe that's the problem? Jun 16, 2015 11:35:00 AM org.jenkinsci.plugins.ghprb.GhprbGitHubAuth getConnection SEVERE: Unable to connect using credentials: fab49720-e9f1-4fac-aad0-f4de321a6b42 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1672) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.handleApiError(Requester.java:482) at org.kohsuke.github.Requester._to(Requester.java:245) at org.kohsuke.github.Requester.to(Requester.java:191) at org.kohsuke.github.GitHub.getMyself(GitHub.java:261) at org.kohsuke.github.GitHub.<init>(GitHub.java:137) at org.kohsuke.github.GitHubBuilder.build(GitHubBuilder.java:195) at org.jenkinsci.plugins.ghprb.GhprbGitHubAuth.getConnection(GhprbGitHubAuth.java:118) at org.jenkinsci.plugins.ghprb.GhprbTrigger.getGitHub(GhprbTrigger.java:266) at org.jenkinsci.plugins.ghprb.GhprbGitHub.get(GhprbGitHub.java:23) at org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:61) at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:88) at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:134) at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:204) at hudson.triggers.Trigger.checkTriggers(Trigger.java:266) at hudson.triggers.Trigger$Cron.doRun(Trigger.java:215) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) at sun.security.ssl.Handshaker.process_record(Handshaker.java:837) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.parse(Requester.java:447) at org.kohsuke.github.Requester._to(Requester.java:224) ... 21 more Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:350) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:260) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) ... 35 more Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:208) at java.security.cert.CertPathValidator.validate(CertPathValidator.java:279) at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:345) ... 41 more

    Jenkins JIRA | 1 year ago | Adam Gavish
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors
  3. 0

    PKIX path building failed,How Can I fix it?

    GitHub | 2 years ago | klisly
    retrofit.RetrofitError: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    DocuSignAPI: unable to find valid certification path to requested target

    Stack Overflow | 2 years ago | William Asher
    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
  6. 0

    SSLHandshakeException Jersey 2.0 client

    Stack Overflow | 2 years ago | Hammerin87
    javax.ws.rs.ProcessingException: 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. tvrmsmith 4 times, last 2 months ago
  2. Dore 25 times, last 3 months ago
  3. andyglick 17 times, last 2 months ago
  4. davidvanlaatum 10 times, last 4 months ago
  5. Andreas Häber 8 times, last 3 weeks ago
2 more registered users
58 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.security.cert.CertPathValidatorException

    Path does not chain with any of the trust anchors

    at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate()
  2. Java RT
    Validator.validate
    1. sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:208)
    2. java.security.cert.CertPathValidator.validate(CertPathValidator.java:279)
    3. sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:345)
    4. sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:260)
    5. sun.security.validator.Validator.validate(Validator.java:260)
    5 frames
  3. Java JSSE
    SSLSocketImpl.startHandshake
    1. sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
    2. sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    3. sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    4. sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428)
    5. sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)
    6. sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)
    7. sun.security.ssl.Handshaker.process_record(Handshaker.java:837)
    8. sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)
    9. sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    10. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
    11. sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
    11 frames
  4. Java RT
    HttpsURLConnectionImpl.getResponseCode
    1. sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    2. sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    3. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    4. java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
    5. sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
    5 frames
  5. org.kohsuke.github
    GitHubBuilder.build
    1. org.kohsuke.github.Requester.parse(Requester.java:447)
    2. org.kohsuke.github.Requester._to(Requester.java:224)
    3. org.kohsuke.github.Requester.to(Requester.java:191)
    4. org.kohsuke.github.GitHub.getMyself(GitHub.java:261)
    5. org.kohsuke.github.GitHub.<init>(GitHub.java:137)
    6. org.kohsuke.github.GitHubBuilder.build(GitHubBuilder.java:195)
    6 frames
  6. org.jenkinsci.plugins
    GhprbTrigger.run
    1. org.jenkinsci.plugins.ghprb.GhprbGitHubAuth.getConnection(GhprbGitHubAuth.java:118)
    2. org.jenkinsci.plugins.ghprb.GhprbTrigger.getGitHub(GhprbTrigger.java:266)
    3. org.jenkinsci.plugins.ghprb.GhprbGitHub.get(GhprbGitHub.java:23)
    4. org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:61)
    5. org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:88)
    6. org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:134)
    7. org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:204)
    7 frames
  7. Hudson
    SafeTimerTask.run
    1. hudson.triggers.Trigger.checkTriggers(Trigger.java:266)
    2. hudson.triggers.Trigger$Cron.doRun(Trigger.java:215)
    3. hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
    3 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    2. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    7. java.lang.Thread.run(Thread.java:745)
    7 frames