[JIRA] (JENKINS-39515) Failed to install Go 1.7.3

25 views
Skip to first unread message

cohawk@yahoo.com (JIRA)

unread,
Nov 4, 2016, 12:11:01 PM11/4/16
to jenkinsc...@googlegroups.com
KH Cheng created an issue
 
Jenkins / Bug JENKINS-39515
Failed to install Go 1.7.3
Issue Type: Bug Bug
Assignee: Christopher Orr
Attachments: jenkins.txt
Components: golang-plugin
Created: 2016/Nov/04 4:10 PM
Environment: JENKINS_VERSION 2.19.2
golang 1.1
Running fresh installation from latest docker image and downloaded/running latest jenkins.war file.
Priority: Blocker Blocker
Reporter: KH Cheng

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.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

hotoleanu.ciprian@gmail.com (JIRA)

unread,
Jan 5, 2017, 6:35:02 PM1/5/17
to jenkinsc...@googlegroups.com
Stefan Ciprian Hotoleanu commented on Bug JENKINS-39515
 
Re: Failed to install Go 1.7.3

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

brad@teambrad.net (JIRA)

unread,
Jan 8, 2017, 6:37:03 PM1/8/17
to jenkinsc...@googlegroups.com

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.

  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
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/* .

brad@teambrad.net (JIRA)

unread,
Jan 8, 2017, 6:37:05 PM1/8/17
to jenkinsc...@googlegroups.com
Bradley Falzon edited a comment on Bug JENKINS-39515
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

{code:java}

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/* .
{code}

brad@teambrad.net (JIRA)

unread,
Jan 8, 2017, 6:47:02 PM1/8/17
to jenkinsc...@googlegroups.com
Bradley Falzon edited a comment on Bug JENKINS-39515
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

{code:java}
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/* .
{code}

neovortex@gmail.com (JIRA)

unread,
Feb 12, 2017, 10:09:06 PM2/12/17
to jenkinsc...@googlegroups.com

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.

chris@orr.me.uk (JIRA)

unread,
Feb 13, 2017, 12:10:02 AM2/13/17
to jenkinsc...@googlegroups.com

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

neovortex@gmail.com (JIRA)

unread,
Feb 13, 2017, 12:53:04 AM2/13/17
to jenkinsc...@googlegroups.com

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)

speedy.carr+jenkins@gmail.com (JIRA)

unread,
Feb 24, 2017, 7:18:02 PM2/24/17
to jenkinsc...@googlegroups.com

Per the issue link from Tiernan's comment, 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.

speedy.carr+jenkins@gmail.com (JIRA)

unread,
Feb 24, 2017, 7:18:03 PM2/24/17
to jenkinsc...@googlegroups.com
Micah Lapping-Carr edited a comment on Bug JENKINS-39515
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.

chris@orr.me.uk (JIRA)

unread,
Feb 25, 2017, 8:29:04 AM2/25/17
to jenkinsc...@googlegroups.com
Christopher Orr closed an issue as Won't Fix
 

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.

Change By: Christopher Orr
Status: Open Closed
Resolution: Won't Fix
Reply all
Reply to author
Forward
0 new messages