Can't download plugins - HTTP 302 redirect

615 views
Skip to first unread message

Corey Wei

unread,
Sep 18, 2016, 1:22:53 AM9/18/16
to Jenkins Users
Hi,

My Jenkins 2.22 is working with Tomcat. There are some errors while I tried to install plugins like this:

18-Sep-2016 11:17:05.590 SEVERE [Update center installer thread [#1]] hudson.model.UpdateCenter$DownloadJob.run Failed to install GIT server Plugin
 java.io.IOException: Downloaded file /home/deploy/.jenkins2/plugins/git-server.jpi.tmp does not match expected SHA-1, expected 'LoG8X55ycVzgPjwTtCA/iKb7lvw=', actual 'Lbk3pB/mu/UlYJO4o2ttQkZ+mvs='
        at hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:1799)
        at hudson.model.UpdateCenter.access$1100(UpdateCenter.java:147)
        at hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:1950)
        at hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1194)
        at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1669)
        at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1864)
        at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1640)
        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:110)
        at java.lang.Thread.run(Thread.java:745)

$ cat ~/.jenkins2/plugins/git-server.jpi.tmp
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
</body></html>

Looks like it redirects to a mirror update center.

Any comments would be appreciated.

Thanks

R. Tyler Croy

unread,
Sep 18, 2016, 2:59:06 AM9/18/16
to jenkins...@googlegroups.com
(replies inline)

On Sat, 17 Sep 2016, Corey Wei wrote:

> Hi,
>
> My Jenkins 2.22 is working with Tomcat. There are some errors while I tried
> to install plugins like this:
>
> 18-Sep-2016 11:17:05.590 SEVERE [Update center installer thread [#1]]
> hudson.model.UpdateCenter$DownloadJob.run Failed to install GIT server
> Plugin
> java.io.IOException: Downloaded file
> /home/deploy/.jenkins2/plugins/git-server.jpi.tmp does not match expected
> SHA-1, expected 'LoG8X55ycVzgPjwTtCA/iKb7lvw=', actual
> 'Lbk3pB/mu/UlYJO4o2ttQkZ+mvs='


I recently added a mirror located in China
(https://issues.jenkins-ci.org/browse/INFRA-924).

Would you mind downloading some files and comparing between the mirror you're
hitting and: http://ftp-nyc.osuosl.org/pub/jenkins/


If that mirror is serving corrupted artifacts I will remove it from the
rotation immediately.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f1aca3c2-9edb-4c41-addb-042bbb5bae85%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>

% gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------
signature.asc

Corey Wei

unread,
Sep 18, 2016, 4:43:12 AM9/18/16
to Jenkins Users
Hi Croy,

I just downloaded a hpi from the mirror and the file's good.

The problem is that Jenkins server doesn't  follow 302 redirects to download the correct file but always downloads a "302 redirect" response file.

# a 302 redirect file
$ cat git-server.jpi.tmp
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
</body></html>

# file can be downloaded  correctly via wget
Resolving updates.jenkins-ci.org... 52.202.51.185
Connecting to updates.jenkins-ci.org|52.202.51.185|:80... connected.
HTTP request sent, awaiting response... 302 Found
Resolving mirrors.jenkins-ci.org... 52.202.51.185
Reusing existing connection to updates.jenkins-ci.org:80.
HTTP request sent, awaiting response... 302 Found
Resolving mirrors.tuna.tsinghua.edu.cn... 166.111.206.63, 2402:f000:1:416:166:111:206:63
Connecting to mirrors.tuna.tsinghua.edu.cn|166.111.206.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40729 (40K) [application/octet-stream]
Saving to: “git-server.hpi.1”

100%[===========================================================================================>] 40,729      --.-K/s   in 0s


2016-09-18 15:49:58 (188 MB/s) - “git-server.hpi.1” saved [40729/40729]

Corey Wei

unread,
Sep 19, 2016, 12:10:57 AM9/19/16
to Jenkins Users
anyone can help?

Baptiste Mathus

unread,
Sep 19, 2016, 2:56:58 PM9/19/16
to jenkins...@googlegroups.com
I think it's https://issues.jenkins-ci.org/browse/JENKINS-8028 but surprised it's still active. Pretty sure I saw fixes about this. Maybe it was on some other parts like Tools.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/45c174ea-1307-46f0-bf15-05af87cddf08%40googlegroups.com.

Daniel Beck

unread,
Sep 21, 2016, 10:02:08 PM9/21/16
to jenkins...@googlegroups.com
Turns out this was https://issues.jenkins-ci.org/browse/JENKINS-38340 and we removed the mirror from the list, as its admins don't want to serve files via HTTP.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4nYT_5_OgXE%3D3ZL-6ZCjgwa86wkAdXQXKxJz5mwYFP5w%40mail.gmail.com.

Corey Wei

unread,
Sep 22, 2016, 4:30:04 AM9/22/16
to Jenkins Users, m...@beckweb.net
Thanks Daniel & Baptiste. It's working fine.
Does it have any plan to support http to https redirect?

Daniel Beck

unread,
Sep 22, 2016, 10:51:19 AM9/22/16
to jenkins...@googlegroups.com

> On 22.09.2016, at 10:30, Corey Wei <core...@gmail.com> wrote:
>
> Does it have any plan to support http to https redirect?

Probably not any time soon, as it needs support in Jenkins and older versions will just fail to download anything.

However, since we now have Azure sponsoring us, we may just upgrade everything to HTTPS. Not sure what Tyler's plans currently are.

Reply all
Reply to author
Forward
0 new messages