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

Failed to install Go 1.7.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Won't Fix
    • Component/s: golang-plugin
    • Labels:
      None
    • Environment:
      JENKINS_VERSION 2.19.2
      golang 1.1
      Running fresh installation from latest docker image and downloaded/running latest jenkins.war file.
    • Similar Issues:

      Description

      The golang-plugin is unable to install specifically Go 1.7.3.

      However, if the job configuration is changed to 1.7.1 or 1.7, or 1.6.3, the installation works fine.

      The error log says "Caused by: java.io.IOException: Failed to unpack https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz (164515 bytes read of total 82565628)" but I am able to manually download (using both curl and wget) and untar the URL just fine.

      Apart from downloading from https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz, I have also placed the tarball on another web server and added that location as an installer, no luck.

        Attachments

          Issue Links

            Activity

            Hide
            stefanciprian Stefan Ciprian Hotoleanu added a comment -

            I believe that there also some issues for Go 1.7.4:

            Unpacking Go from https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4 on Jenkins
            FATAL: Failed to install https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4
            java.io.IOException: Failed to install https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4
            at hudson.FilePath.installIfNecessaryFrom(FilePath.java:854)
            at hudson.FilePath.installIfNecessaryFrom(FilePath.java:762)
            at org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:56)
            at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
            at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
            at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
            at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:43)
            at org.jenkinsci.plugins.golang.GolangBuildWrapper.setUp(GolangBuildWrapper.java:34)
            at hudson.model.Build$BuildExecution.doRun(Build.java:156)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            at hudson.model.Run.execute(Run.java:1728)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.io.IOException: Failed to unpack https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz (164292 bytes read of total 84021919)
            at hudson.FilePath.installIfNecessaryFrom(FilePath.java:848)
            ... 13 more
            Caused by: java.io.IOException: Failed to extract input stream
            at hudson.FilePath.readFromTar(FilePath.java:2289)
            at hudson.FilePath.access$400(FilePath.java:195)
            at hudson.FilePath$10.invoke(FilePath.java:724)
            at hudson.FilePath$10.invoke(FilePath.java:722)
            at hudson.FilePath.act(FilePath.java:996)
            at hudson.FilePath.act(FilePath.java:974)
            at hudson.FilePath.untarFrom(FilePath.java:722)
            at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
            ... 13 more
            Caused by: java.io.IOException: Truncated TAR archive
            at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:618)
            at java.io.InputStream.read(InputStream.java:101)
            at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
            at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
            at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
            at hudson.util.IOUtils.copy(IOUtils.java:40)
            at hudson.FilePath.readFromTar(FilePath.java:2279)
            ... 20 more
            Finished: FAILURE

            Show
            stefanciprian Stefan Ciprian Hotoleanu added a comment - I believe that there also some issues for Go 1.7.4: Unpacking Go from https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4 on Jenkins FATAL: Failed to install https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4 java.io.IOException: Failed to install https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:854) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:762) at org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:56) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:43) at org.jenkinsci.plugins.golang.GolangBuildWrapper.setUp(GolangBuildWrapper.java:34) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: java.io.IOException: Failed to unpack https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz (164292 bytes read of total 84021919) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:848) ... 13 more Caused by: java.io.IOException: Failed to extract input stream at hudson.FilePath.readFromTar(FilePath.java:2289) at hudson.FilePath.access$400(FilePath.java:195) at hudson.FilePath$10.invoke(FilePath.java:724) at hudson.FilePath$10.invoke(FilePath.java:722) at hudson.FilePath.act(FilePath.java:996) at hudson.FilePath.act(FilePath.java:974) at hudson.FilePath.untarFrom(FilePath.java:722) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846) ... 13 more Caused by: java.io.IOException: Truncated TAR archive at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:618) at java.io.InputStream.read(InputStream.java:101) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792) at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769) at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744) at hudson.util.IOUtils.copy(IOUtils.java:40) at hudson.FilePath.readFromTar(FilePath.java:2279) ... 20 more Finished: FAILURE
            Hide
            bradleyfalzon Bradley Falzon added a comment - - edited

            I've also had the same issue since Go 1.7.3, testing Go 1.8 I've used the following workaround. This should be good enough, comment is there's improvements (obviously make adjustments for the later Go versions as appropriate).

            1. Open Jenkins
            2. Manage Jenkins
            3. Global Tool Configuration
            4. Go Installations...
            5. Add Go
            6. Name: Go 1.8
            7. Delete install from golang.org installer
            8. Add installer: Shell command
            9. Label:
            10. Command (see below)
            11. Tool Home: .
            12. Save
            test -e ./bin/go && exit
            wget -q https://storage.googleapis.com/golang/go1.8beta2.linux-amd64.tar.gz
            rm -rf go
            tar xzf go1.8beta2.linux-amd64.tar.gz
            rm -f go1.8beta2.linux-amd64.tar.gz
            mv go/* .
            
            Show
            bradleyfalzon Bradley Falzon added a comment - - edited I've also had the same issue since Go 1.7.3, testing Go 1.8 I've used the following workaround. This should be good enough, comment is there's improvements (obviously make adjustments for the later Go versions as appropriate). Open Jenkins Manage Jenkins Global Tool Configuration Go Installations... Add Go Name: Go 1.8 Delete install from golang.org installer Add installer: Shell command Label: Command (see below) Tool Home: . Save test -e ./bin/go && exit wget -q https: //storage.googleapis.com/golang/go1.8beta2.linux-amd64.tar.gz rm -rf go tar xzf go1.8beta2.linux-amd64.tar.gz rm -f go1.8beta2.linux-amd64.tar.gz mv go/* .
            Hide
            nvx Tiernan Messmer added a comment -

            There appears to be an issue with the gzip footer contents of the files hosted which the apache commons gzip library can not handle. https://github.com/golang/go/issues/19052 has more details.

            Show
            nvx Tiernan Messmer added a comment - There appears to be an issue with the gzip footer contents of the files hosted which the apache commons gzip library can not handle. https://github.com/golang/go/issues/19052 has more details.
            Hide
            orrc Christopher Orr added a comment -

            Interesting, but this problem has been around since at least Go 1.4.3 (though it could possible be the same issue): https://github.com/orrc/jenkins-filepath-untar#problem

            Show
            orrc Christopher Orr added a comment - Interesting, but this problem has been around since at least Go 1.4.3 (though it could possible be the same issue): https://github.com/orrc/jenkins-filepath-untar#problem
            Hide
            nvx Tiernan Messmer added a comment -

            Interesting indeed. I checked 1.6.2 linux tarball and it was fine contrary to what is mentioned in that repository, but then I noticed the linked tarballs were for darwin not linux, so I re-ran my test against some of those files and it now matches the results, where 1.4.3 fails (but 1.4.2 works), and 1.5.1 works, while 1.5.2+ fails

            I'm not sure why this issue started appearing on the darwin builds before it started appearing on the linux builds, but it definitely appears to be the same problem!

            Size of go1.4.2.darwin-amd64-osx10.8.tar.gz from header  230127616
            gunzipped size of go1.4.2.darwin-amd64-osx10.8.tar.gz    230127616
            
            Size of go1.4.3.darwin-amd64.tar.gz from header          683008
            gunzipped size of go1.4.3.darwin-amd64.tar.gz            221932544
            
            Size of go1.5.darwin-amd64.tar.gz from header            286595584
            gunzipped size of go1.5.darwin-amd64.tar.gz              286595584
            
            Size of go1.5.1.darwin-amd64.tar.gz from header          286660096
            gunzipped size of go1.5.1.darwin-amd64.tar.gz            286660096
            
            Size of go1.5.2.darwin-amd64.tar.gz from header          242176
            gunzipped size of go1.5.2.darwin-amd64.tar.gz            281260544
            
            Size of go1.6.2.darwin-amd64.tar.gz from header          222720
            gunzipped size of go1.6.2.darwin-amd64.tar.gz            321086976
            

            (command used to generate the above is linked in the go github issue)

            Show
            nvx Tiernan Messmer added a comment - Interesting indeed. I checked 1.6.2 linux tarball and it was fine contrary to what is mentioned in that repository, but then I noticed the linked tarballs were for darwin not linux, so I re-ran my test against some of those files and it now matches the results, where 1.4.3 fails (but 1.4.2 works), and 1.5.1 works, while 1.5.2+ fails I'm not sure why this issue started appearing on the darwin builds before it started appearing on the linux builds, but it definitely appears to be the same problem! Size of go1.4.2.darwin-amd64-osx10.8.tar.gz from header 230127616 gunzipped size of go1.4.2.darwin-amd64-osx10.8.tar.gz 230127616 Size of go1.4.3.darwin-amd64.tar.gz from header 683008 gunzipped size of go1.4.3.darwin-amd64.tar.gz 221932544 Size of go1.5.darwin-amd64.tar.gz from header 286595584 gunzipped size of go1.5.darwin-amd64.tar.gz 286595584 Size of go1.5.1.darwin-amd64.tar.gz from header 286660096 gunzipped size of go1.5.1.darwin-amd64.tar.gz 286660096 Size of go1.5.2.darwin-amd64.tar.gz from header 242176 gunzipped size of go1.5.2.darwin-amd64.tar.gz 281260544 Size of go1.6.2.darwin-amd64.tar.gz from header 222720 gunzipped size of go1.6.2.darwin-amd64.tar.gz 321086976 (command used to generate the above is linked in the go github issue)
            Hide
            micahlc Micah Lapping-Carr added a comment - - edited

            Per the issue link from Tiernan's comment (a few comments above mine), this has been fixed going forward (and I can confirm that go 1.8 on linux worked), but there are no plans to go back and update previous installers, as other folks might have dependencies on the hashes from them. One possible fix for this issue for this plugin would be to find somewhere to host updated installers (or find where someone else trustworthy has hosted them) and reference those, rather than the official ones, if a user of the plugin requests it. Not clean by any means, but would fix the issues.

            Show
            micahlc Micah Lapping-Carr added a comment - - edited Per the issue link from Tiernan's comment (a few comments above mine), this has been fixed going forward (and I can confirm that go 1.8 on linux worked), but there are no plans to go back and update previous installers, as other folks might have dependencies on the hashes from them. One possible fix for this issue for this plugin would be to find somewhere to host updated installers (or find where someone else trustworthy has hosted them) and reference those, rather than the official ones, if a user of the plugin requests it. Not clean by any means, but would fix the issues.
            Hide
            orrc Christopher Orr added a comment -

            Since the archive files have apparently been fixed for the current and future Go releases, there's not really anything to be done here.

            Of course, Jenkins could handle this type of .gz file better, but that's a matter for the linked upstream issue.

            If anybody needs to install the previous Go releases, they should use the "install from local archive" functionality.

            Show
            orrc Christopher Orr added a comment - Since the archive files have apparently been fixed for the current and future Go releases, there's not really anything to be done here. Of course, Jenkins could handle this type of .gz file better, but that's a matter for the linked upstream issue. If anybody needs to install the previous Go releases, they should use the "install from local archive" functionality.

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                chnrxn KH Cheng
              • Votes:
                6 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: