java.lang.RuntimeException

Failed while invoking URL https://<server>:8443/plugins/servlet/artifactoryAdminConfigServlet?planKey=NA-P2AC-JOB1 to get Bamboo variables. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Samebug tips2

Set the 'mail.smtp.ssl.trust' system property to an smtp host, like 'smtp.gmail.com'.

If you're using wiremock, configure your code to accept wiremock self-signed certificate or create a keystore and certificate that are trusted by your HTTP client and configure wiremock to use that

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web48783

  • via JFrog JIRA by Derek Pilat, 10 months ago
    Failed while invoking URL https://<server>:8443/plugins/servlet/artifactoryAdminConfigServlet?planKey=NA-P2AC-JOB1 to get Bamboo variables. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  • via JFrog JIRA by Derek Pilat, 1 year ago
    Failed while invoking URL https://<server>:8443/plugins/servlet/artifactoryAdminConfigServlet?planKey=NA-P2AC-JOB1 to get Bamboo variables. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  • via JFrog JIRA by J. E., 1 year ago
    Failed while invoking URL https://<server>/bamboo/plugins/servlet/artifactoryAdminConfigServlet?planKey=<project>-JOB1 to get Bamboo variables. Stream closed
  • Stack trace

    • java.lang.RuntimeException: Failed while invoking URL https://<server>:8443/plugins/servlet/artifactoryAdminConfigServlet?planKey=NA-P2AC-JOB1 to get Bamboo variables. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.jfrog.bamboo.configuration.ConfigurationHelper.getAllVariables(ConfigurationHelper.java:75) at org.jfrog.bamboo.configuration.ConfigurationHelper.getBuildJdkOverride(ConfigurationHelper.java:43) at org.jfrog.bamboo.task.ArtifactoryTaskType.getConfiguredJdkPath(ArtifactoryTaskType.java:85) at org.jfrog.bamboo.task.ArtifactoryMaven3Task.getExecutable(ArtifactoryMaven3Task.java:147) at org.jfrog.bamboo.task.ArtifactoryMaven3Task.getCommand(ArtifactoryMaven3Task.java:185) at org.jfrog.bamboo.task.ArtifactoryMaven3Task.execute(ArtifactoryMaven3Task.java:104) at com.atlassian.bamboo.task.TaskExecutorImpl$2.call(TaskExecutorImpl.java:278) at com.atlassian.bamboo.task.TaskExecutorImpl$2.call(TaskExecutorImpl.java:274) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:274) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:106) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:124) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:115) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) 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:1937) 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:1478) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:957) at sun.security.ssl.Handshaker.process_record(Handshaker.java:892) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:735) 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: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 org.jfrog.bamboo.configuration.ConfigurationHelper.executeMethod(ConfigurationHelper.java:110) at org.jfrog.bamboo.configuration.ConfigurationHelper.getAllVariables(ConfigurationHelper.java:60) ... 22 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:1460) ... 40 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:145) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 46 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 1 month ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 11 months ago
    57 more bugmates