Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73433

plugin doesn't handle cert issues with jenkins update site

      in a jenkins deployment that gets https cert failures with the jenkins update site (and has the plugin installed):

      update a 5 or 6 plugins at once (requires more than a couple concurrent downloads to trigger the issue)

       

      expected: all plugins download sucessfully

       

      actual: only the first 1 or 2 successfully download, the others fail with the following message:

      sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297) at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380) Caused: sun.security.validator.ValidatorException: PKIX path building failed at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385) at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290) at java.base/sun.security.validator.Validator.validate(Validator.java:264) at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321) at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221) at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1313) Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1329) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1204) at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1151) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402) at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2758) at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1323) Caused: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/structs/338.v848422169819/structs.hpi to /usr/local/jenkins/data/plugins/structs.jpi.tmp at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1334) Caused: java.io.IOException: Failed to download from https://updates.jenkins.io/download/plugins/structs/338.v848422169819/structs.hpi (redirected to: https://get.jenkins.io/plugins/structs/338.v848422169819/structs.hpi) at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1368) at hudso

      issue happens with any and all plugins being updated from the update site.

          [JENKINS-73433] plugin doesn't handle cert issues with jenkins update site

          Andrew Norman added a comment -

          issue pertains to running jenkins on OpenJdk installations. I was able to recreate this with a jenkins hosted on OpenJDK Runtime Environment 18.9 (build 11+28).

          Andrew Norman added a comment - issue pertains to running jenkins on OpenJdk installations. I was able to recreate this with a jenkins hosted on OpenJDK Runtime Environment 18.9 (build 11+28).

          Mark Waite added a comment -

          Neither the OpenJDK project nor the Jenkins project support OpenJDK 18. Jenkins weekly supports Java 17 and Java 21. Jenkins LTS supports Java 11, Java 17, and Java 21 for another 16 weeks, then it will drop support for Java 11.

          The skip certificate check plugin is not actively maintained and is considered bad practice. Ignoring SSL certificates is a dangerous choice. There is no plan to fix this issue.

          Mark Waite added a comment - Neither the OpenJDK project nor the Jenkins project support OpenJDK 18. Jenkins weekly supports Java 17 and Java 21. Jenkins LTS supports Java 11, Java 17, and Java 21 for another 16 weeks, then it will drop support for Java 11. The skip certificate check plugin is not actively maintained and is considered bad practice. Ignoring SSL certificates is a dangerous choice. There is no plan to fix this issue.

            kohsuke Kohsuke Kawaguchi
            normana400 Andrew Norman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: