Retry plugin download when getting 403 forbidden from plugin update

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I'm running Jenkins in corporate environment and that means Jenkins doesn't have unlimited access to internet. All traffic goes through proxy and every allowed domain needs to be white-listed separately.

       

      When downloading plugin updates, the downloads fail with 403 Forbidden if a new mirror has been added and https://updates.jenkins.io/download/plugins/xxx call is redirected to the not-white-listed domain.

       

      People have to do things like this to circumvent the problem:
      https://www.north-47.com/knowledge-base/update-jenkins-plugins-behind-a-corporate-proxy/

       

      It seems unnecessary to fiddle around with the update-center.json or default.json when a simple retry to another domain could possibly be done in Jenkins? I'd think that this would be a good feature too if getting a 404 from the plugin mirror site (though that hasn't happened to me ever).

       

      -------------------------------------------------------------

      java.io.IOException: Failed to download from https://updates.jenkins.io/download/plugins/pipeline-rest-api/2.17/pipeline-rest-api.hpi (redirected to: https://ftp.halifax.rwth-aachen.de/jenkins/plugins/pipeline-rest-api/2.17/pipeline-rest-api.hpi)
      at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1321)
      at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1869)
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2147)
      at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1843)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:118)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/pipeline-rest-api/2.17/pipeline-rest-api.hpi to xxx/pipeline-rest-api.jpi.tmp
      at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1287)
      ... 7 more
      Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden"
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1950)
      at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1945)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1944)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1514)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
      at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:1280)

            Assignee:
            Unassigned
            Reporter:
            Vesa Kippola
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: