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

Plugin update installer downloads "302 redirect" response as the .hpi file, then reports success.

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • core
    • None
    • Hudson ver. 1.377
      Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)
      SunOS 5.10 Generic_120012-14 i86pc i386 i86pc Solaris


      The Plugin update installer should follow 302 redirects, not download them.

      Attempting to update a plugin via the "Update Center" on the web console appears to succeed, but actually always downloads a "302 redirect" file. Subsequent Hudson re-start then results in plugin failure. (And Hudson offers to discard the configuration)

      eg. attempting to update "LavaLampNotifier", the LavaLampNotifier.hpi downloaded is as attached.
      Note this happens when we try to update any plugin - it is not restricted just to lavaLampNotifier. Can fetch the plugins fine using "wget" :-

      $ wget http://updates.hudson-labs.org/download/plugins/LavaLampNotifier/1.2/LavaLampNotifier.hpi
      -11:01:20- http://updates.hudson-labs.org/download/plugins/LavaLampNotifier/1.2/LavaLampNotifier.hpi
      => `LavaLampNotifier.hpi.2'
      Resolving updates.hudson-labs.org... 173.203.118.45
      Connecting to updates.hudson-labs.org|173.203.118.45|:80... connected.
      HTTP request sent, awaiting response... 302 Found
      Location: http://download.hudson-labs.org/plugins/LavaLampNotifier/1.2/LavaLampNotifier.hpi [following]
      -11:01:24- http://download.hudson-labs.org/plugins/LavaLampNotifier/1.2/LavaLampNotifier.hpi
      => `LavaLampNotifier.hpi.2'
      Resolving download.hudson-labs.org... 192.18.49.134
      Connecting to download.hudson-labs.org|192.18.49.134|:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 25,455 (25K) [text/plain]

      100%[============================================================================================================>] 25,455 2.17K/s ETA 00:00

      11:02:04 (983.61 B/s) - `LavaLampNotifier.hpi.2' saved [25455/25455]

          [JENKINS-8028] Plugin update installer downloads "302 redirect" response as the .hpi file, then reports success.

          Yuanfei Zhu added a comment -

          This issue regresses on 2.7.4

          Downloaded plugins content:

          jenkins@22feb80c2a1c:/$ cat /var/jenkins_home/plugins/slack.jpi.tmp
          <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
          <html><head>
          <title>302 Found</title>
          </head><body>
          <h1>Found</h1>
          <p>The document has moved <a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/slack/2.0.1/slack.hpi">here</a>.</p>
          </body></html>
          

          Java version:

          jenkins@22feb80c2a1c:/$ java -version
          openjdk version "1.8.0_102"
          OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-1~bpo8+1-b14)
          OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)
          

          Yuanfei Zhu added a comment - This issue regresses on 2.7.4 Downloaded plugins content: jenkins@22feb80c2a1c:/$ cat / var /jenkins_home/plugins/slack.jpi.tmp <!DOCTYPE HTML PUBLIC "- //IETF//DTD HTML 2.0//EN" > <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href= "https: //mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/slack/2.0.1/slack.hpi" >here</a>.</p> </body></html> Java version: jenkins@22feb80c2a1c:/$ java -version openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-1~bpo8+1-b14) OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)

          ethn chao added a comment - - edited

          It happened again!

          [ xxx ]$ cat /home/irm/.jenkins/plugins/workflow-cps.jpi.tmp
          <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
          <html><head>
          <title>302 Found</title>
          </head><body>
          <h1>Found</h1>
          <p>The document has moved <a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/workflow-cps/2.17/workflow-cps.hpi">here</a>.</p>
          </body></html>
          
          [ xxx ]$ java -version
          java version "1.7.0_80"
          Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
          Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
          

          ethn chao added a comment - - edited It happened again! [ xxx ]$ cat /home/irm/.jenkins/plugins/workflow-cps.jpi.tmp <!DOCTYPE HTML PUBLIC "- //IETF//DTD HTML 2.0//EN" > <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href= "https: //mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/workflow-cps/2.17/workflow-cps.hpi" >here</a>.</p> </body></html> [ xxx ]$ java -version java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

          ethn chao added a comment -

          This issue just happened again, please check the comment below this issue.

          ethn chao added a comment - This issue just happened again, please check the comment below this issue.

          Daniel Beck added a comment -

          What's the output of e.g. curl -L -I https://updates.jenkins-ci.org/latest/groovy-events-listener-plugin-master.hpi from a machine that gets served the same mirror?

          Daniel Beck added a comment - What's the output of e.g. curl -L -I https://updates.jenkins-ci.org/latest/groovy-events-listener-plugin-master.hpi from a machine that gets served the same mirror?

          Yuanfei Zhu added a comment -

          danielbeck

          root@iZ25cwh5enyZ:~#  curl -L -I https://updates.jenkins-ci.org/latest/groovy-events-listener-plugin-master.hpi
          HTTP/1.1 302 Found
          Date: Tue, 20 Sep 2016 07:23:02 GMT
          Server: Apache/2.4.7 (Ubuntu)
          Location: https://updates.jenkins-ci.org/download/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi
          Content-Type: text/html; charset=iso-8859-1
          
          HTTP/1.1 302 Found
          Date: Tue, 20 Sep 2016 07:23:02 GMT
          Server: Apache/2.4.7 (Ubuntu)
          Location: http://mirrors.jenkins-ci.org/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi
          Content-Type: text/html; charset=iso-8859-1
          
          HTTP/1.1 302 Found
          Date: Tue, 20 Sep 2016 07:23:03 GMT
          Server: Apache/2.4.7 (Ubuntu)
          X-MirrorBrain-Mirror: tsinghua.edu.cn
          X-MirrorBrain-Realm: country
          Link: <http://mirrors.jenkins-ci.org/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi.meta4>; rel=describedby; type="application/metalink4+xml"
          Link: <https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=1; geo=CN
          Link: <http://ftp.yz.yamagata-u.ac.jp/pub/misc/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=2; geo=jp
          Link: <http://ftp.tsukuba.wide.ad.jp/software/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=3; geo=jp
          Link: <http://mirror.xmission.com/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=4; geo=us
          Link: <http://ftp-chi.osuosl.org/pub/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=5; geo=us
          Location: https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi
          Content-Type: text/html; charset=iso-8859-1
          
          HTTP/1.1 200 OK
          Server: nginx/1.10.1
          Date: Tue, 20 Sep 2016 07:20:32 GMT
          Content-Type: application/octet-stream
          Content-Length: 7462960
          Last-Modified: Tue, 19 Apr 2016 20:40:09 GMT
          Connection: keep-alive
          ETag: "571697a9-71e030"
          Strict-Transport-Security: max-age=31536000
          Accept-Ranges: bytes
          

          Yuanfei Zhu added a comment - danielbeck root@iZ25cwh5enyZ:~# curl -L -I https: //updates.jenkins-ci.org/latest/groovy-events-listener-plugin-master.hpi HTTP/1.1 302 Found Date: Tue, 20 Sep 2016 07:23:02 GMT Server: Apache/2.4.7 (Ubuntu) Location: https: //updates.jenkins-ci.org/download/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 302 Found Date: Tue, 20 Sep 2016 07:23:02 GMT Server: Apache/2.4.7 (Ubuntu) Location: http: //mirrors.jenkins-ci.org/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 302 Found Date: Tue, 20 Sep 2016 07:23:03 GMT Server: Apache/2.4.7 (Ubuntu) X-MirrorBrain-Mirror: tsinghua.edu.cn X-MirrorBrain-Realm: country Link: <http: //mirrors.jenkins-ci.org/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi.meta4>; rel=describedby; type= "application/metalink4+xml" Link: <https: //mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=1; geo=CN Link: <http: //ftp.yz.yamagata-u.ac.jp/pub/misc/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=2; geo=jp Link: <http: //ftp.tsukuba.wide.ad.jp/software/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=3; geo=jp Link: <http: //mirror.xmission.com/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=4; geo=us Link: <http: //ftp-chi.osuosl.org/pub/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi>; rel=duplicate; pri=5; geo=us Location: https: //mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/groovy-events-listener-plugin-master/1.007/groovy-events-listener-plugin-master.hpi Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 OK Server: nginx/1.10.1 Date: Tue, 20 Sep 2016 07:20:32 GMT Content-Type: application/octet-stream Content-Length: 7462960 Last-Modified: Tue, 19 Apr 2016 20:40:09 GMT Connection: keep-alive ETag: "571697a9-71e030" Strict-Transport-Security: max-age=31536000 Accept-Ranges: bytes

          Daniel Beck added a comment -

          Sorry, wrong URL.

          Jenkins would access an URL like that one: curl -L -I http://updates.jenkins-ci.org/download/plugins/git/3.0.0/git.hpi

          FTR, Responses for German mirrors:

          $ curl -L -I http://updates.jenkins-ci.org/download/plugins/git/3.0.0/git.hpi
          HTTP/1.1 302 Found
          Date: Tue, 20 Sep 2016 16:15:04 GMT
          Server: Apache/2.4.7 (Ubuntu)
          Location: http://mirrors.jenkins-ci.org/plugins/git/3.0.0/git.hpi
          Content-Type: text/html; charset=iso-8859-1
          
          HTTP/1.1 302 Found
          Date: Tue, 20 Sep 2016 16:15:05 GMT
          Server: Apache/2.4.7 (Ubuntu)
          X-MirrorBrain-Mirror: jenkins.mirror.isppower.de
          X-MirrorBrain-Realm: country
          Link: <http://mirrors.jenkins-ci.org/plugins/git/3.0.0/git.hpi.meta4>; rel=describedby; type="application/metalink4+xml"
          Link: <http://jenkins.mirror.isppower.de/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=1; geo=de
          Link: <http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=2; geo=de
          Link: <http://ftp.icm.edu.pl/packages/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=3; geo=pl
          Link: <http://ftp-nyc.osuosl.org/pub/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=4; geo=us
          Link: <http://ftp-chi.osuosl.org/pub/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=5; geo=us
          Location: http://jenkins.mirror.isppower.de/plugins/git/3.0.0/git.hpi
          Content-Type: text/html; charset=iso-8859-1
          
          HTTP/1.1 200 OK
          Server: nginx/0.7.67
          Date: Tue, 20 Sep 2016 16:15:06 GMT
          Content-Type: text/plain
          Content-Length: 2152524
          Last-Modified: Tue, 20 Sep 2016 14:05:11 GMT
          Connection: keep-alive
          Accept-Ranges: bytes

          Daniel Beck added a comment - Sorry, wrong URL. Jenkins would access an URL like that one: curl -L -I http://updates.jenkins-ci.org/download/plugins/git/3.0.0/git.hpi FTR, Responses for German mirrors: $ curl -L -I http://updates.jenkins-ci.org/download/plugins/git/3.0.0/git.hpi HTTP/1.1 302 Found Date: Tue, 20 Sep 2016 16:15:04 GMT Server: Apache/2.4.7 (Ubuntu) Location: http://mirrors.jenkins-ci.org/plugins/git/3.0.0/git.hpi Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 302 Found Date: Tue, 20 Sep 2016 16:15:05 GMT Server: Apache/2.4.7 (Ubuntu) X-MirrorBrain-Mirror: jenkins.mirror.isppower.de X-MirrorBrain-Realm: country Link: <http://mirrors.jenkins-ci.org/plugins/git/3.0.0/git.hpi.meta4>; rel=describedby; type="application/metalink4+xml" Link: <http://jenkins.mirror.isppower.de/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=1; geo=de Link: <http://ftp.halifax.rwth-aachen.de/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=2; geo=de Link: <http://ftp.icm.edu.pl/packages/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=3; geo=pl Link: <http://ftp-nyc.osuosl.org/pub/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=4; geo=us Link: <http://ftp-chi.osuosl.org/pub/jenkins/plugins/git/3.0.0/git.hpi>; rel=duplicate; pri=5; geo=us Location: http://jenkins.mirror.isppower.de/plugins/git/3.0.0/git.hpi Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 OK Server: nginx/0.7.67 Date: Tue, 20 Sep 2016 16:15:06 GMT Content-Type: text/plain Content-Length: 2152524 Last-Modified: Tue, 20 Sep 2016 14:05:11 GMT Connection: keep-alive Accept-Ranges: bytes

          Daniel Beck added a comment -

          http://mirrors.jenkins-ci.org/status.html

          Notably, the CN mirror is the only HTTPS one.

          Daniel Beck added a comment - http://mirrors.jenkins-ci.org/status.html Notably, the CN mirror is the only HTTPS one.

          ye shengfei added a comment -

          danielbeck Really really Thanks Daniel. But what can we do to cover that https-trouble from the Area of China.

          ye shengfei added a comment - danielbeck Really really Thanks Daniel. But what can we do to cover that https-trouble from the Area of China.

          Daniel Beck added a comment -

          Resolving again, let's track the "Chinese HTTPS mirror" issue in JENKINS-38340.

          Daniel Beck added a comment - Resolving again, let's track the "Chinese HTTPS mirror" issue in JENKINS-38340 .

          ye shengfei added a comment - - edited

          danielbeck

          Oh my god!
          It really works!
          so amazing!!!
          you are my god!!!!
          It depressed me nearly a week

          thanks a lot. Orz

          ye shengfei added a comment - - edited danielbeck Oh my god! It really works! so amazing!!! you are my god!!!! It depressed me nearly a week thanks a lot. Orz

            Unassigned Unassigned
            edrandall Ed Randall
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: