Unable to install Jenkins suggested plugins when running through Docker

Hi, I have been having this issue for the past three days.

  • Task: Attempting set up and run Jenkins through a Docker container.
  • Operating System: Windows 10 Enterprise (work pc with full admin permissions)
  • Docker Desktop installed
  • Java JDK 17 installed
  • Issue: After settings up jenkins using docker, the “Suggested Plugins” do not install.

Steps to reproduce.

  1. Open cmd as Administrator

  2. On the command prompt typed the following:
    docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

  3. After run is done, I copied the generated password

  4. In a web browser I opened, localhost:8080

  5. On the “Unlock Jenkins” screen, I entered the password copied from step 3.

  6. On the Customize Jenkins page, I clicked “Install suggested plugins”

  7. After clicking “Install suggested plugins”, all but one of the plugins failed to install: (sometimes they ALL fail)

  8. Clicking Retry does not resolve the issue as the plugin installation continues to fail.

  • The error log keeps saying it can’t access the URL to download the plugin, but I’m able to access the URL when copying them and pasting them into my webbrowser.

  • I also tried installing manually, but that didn’t work either because its just too many dependencies to manually install

  • This is on a work pc, where I have full admin rights

  • When running Jenkins directly on my pc without using Docker the plugins download and install just fine.

The log is thousands of lines long so I will just post a portion of it…

dependent install of pipeline-rest-api for plugin pipeline-stage-view
2022-11-23 14:28:21.871+0000 [id=103]   INFO    hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of pipeline-graph-analysis for plugin pipeline-rest-api
2022-11-23 14:28:21.871+0000 [id=103]   INFO    hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of momentjs for plugin pipeline-stage-view
2022-11-23 14:28:22.719+0000 [id=122]   SEVERE  h.model.UpdateCenter$DownloadJob#run: Failed to install cloudbees-folder
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:434)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
        at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
        at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
        at java.base/sun.security.validator.Validator.validate(Validator.java:264)
        at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
        at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:222)
        at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
        at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1341)
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:131)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:353)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:296)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:291)
        at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
        at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232)
        at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175)
        at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
        at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
        at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
        at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
        at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
        at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
        at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1416)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
        at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
        at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:572)
        at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:201)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2798)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2710)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1854)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
        at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1296)
Caused: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/cloudbees-folder/6.758.vfd75d09eea_a_1/cloudbees-folder.hpi to /var/jenkins_home/plugins/cloudbees-folder.jpi.tmp
        at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1307)
Caused: java.io.IOException: Failed to download from https://updates.jenkins.io/download/plugins/cloudbees-folder/6.758.vfd75d09eea_a_1/cloudbees-folder.hpi (redirected to: https://mirror.xmission.com/jenkins/plugins/cloudbees-folder/6.758.vfd75d09eea_a_1/cloudbees-folder.hpi)
        at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1341)
        at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1898)
        at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2210)
        at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1872)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:121)
        at java.base/java.lang.Thread.run(Thread.java:829)

Can anyone help me in telling me what is going wrong here and how to fix it?

1 Like