Hi Team,
when I am calling job-a which is running in Jenkins server-a from Jenkins server-b. because Jenkins server-a is configured with a self-signed certificate it’s failing to run the job and throwing below SSL error.
00:12:36 Error PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[Pipeline] echo
00:12:36 javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I am using scripted pipeline code to run the job, So can anyone help me to resolve this issue?
My jenkins Server Details:
Jenkins Server Version: 2.361.2
Jenkins Server java Version: java11 (for Jenkins to run), Java8 (for pipelines to run my application code)
Jenkins server hosted on Windows Platform
Jenkins Client Version: 2.361.2
Jenkins Client java Version: java11 (for Jenkins to run), Java8 (for pipelines to run my application code)
Jenkins Client hosted on Ubuntu Platform in a docker container.
Initially, when I am using the curl command it was failing with the below error.
> curl: (60) SSL certificate problem: self signed certificate in certificate chain
> More details here: https://curl.haxx.se/docs/sslcerts.html
>
> curl failed to verify the legitimacy of the server and therefore could not
> establish a secure connection to it. To learn more about this situation and
> how to fix it, please visit the web page mentioned above.
So I added the ROOT CA and server CA cert into my client-trusted Keystore, So after adding it I am able to do the curl. but still, my job is failing with error “Error PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”.