java.io.IOException: Failed to install to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4

Google Groups | coh...@yahoo.com (JIRA) | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I'm using a tool installer which, for some downloads, the URL returns a 302 redirect. However, Jenkins reads the contents of the redirect page (i.e. some text like "This page has moved to http://foo/bar") and attempts to parse that as the zip/tar/whatever file. The stacktrace users see when this happens is pretty cryptic: {noformat} Unpacking Go from http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 on Jenkins FATAL: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 hudson.util.IOException2: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:768) at org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:53) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204) at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:41) at org.jenkinsci.plugins.golang.GolangBuildWrapper.setUp(GolangBuildWrapper.java:34) ... Caused by: hudson.util.IOException2: Failed to unpack http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz (28 bytes read of total -1) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:762) ... 12 more Caused by: hudson.util.IOException2: Failed to extract input stream at hudson.FilePath.readFromTar(FilePath.java:2071) ... Caused by: java.io.IOException: incorrect header check at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:112) at org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:257) ... {noformat} I will try and fix the tool installer in question to resolve the end URL, but this isn't a great idea in the long run — Jenkins should follow the 30x redirects itself.

    Jenkins JIRA | 3 years ago | Christopher Orr
    hudson.util.IOException2: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3
  2. 0

    I'm using a tool installer which, for some downloads, the URL returns a 302 redirect. However, Jenkins reads the contents of the redirect page (i.e. some text like "This page has moved to http://foo/bar") and attempts to parse that as the zip/tar/whatever file. The stacktrace users see when this happens is pretty cryptic: {noformat} Unpacking Go from http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 on Jenkins FATAL: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 hudson.util.IOException2: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:768) at org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:53) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204) at org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:41) at org.jenkinsci.plugins.golang.GolangBuildWrapper.setUp(GolangBuildWrapper.java:34) ... Caused by: hudson.util.IOException2: Failed to unpack http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz (28 bytes read of total -1) at hudson.FilePath.installIfNecessaryFrom(FilePath.java:762) ... 12 more Caused by: hudson.util.IOException2: Failed to extract input stream at hudson.FilePath.readFromTar(FilePath.java:2071) ... Caused by: java.io.IOException: incorrect header check at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:112) at org.apache.tools.tar.TarBuffer.readBlock(TarBuffer.java:257) ... {noformat} I will try and fix the tool installer in question to resolve the end URL, but this isn't a great idea in the long run — Jenkins should follow the 30x redirects itself.

    Jenkins JIRA | 3 years ago | Christopher Orr
    hudson.util.IOException2: Failed to install http://golang.org/dl/go1.3.darwin-amd64-osx10.6.tar.gz to /Users/Shared/Jenkins/Home/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.3
  3. 0

    [JIRA] [core] (JENKINS-23507) FilePath.installIfNecessaryFrom does not follow HTTP 30x redirects

    Google Groups | 1 year ago | scm_iss...@java.net (JIRA)
    java.io.IOException: Failed to install https:<span class="code-comment" style="color: #808080">//storage.googleapis.com/golang/go1.5.4.darwin-amd64.tar.gz to /Users/carlosmelo/.jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go1.5.4 </span> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:860)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

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

    Google Groups | 5 months ago | coh...@yahoo.com (JIRA)
    java.io.IOException: Failed to install to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.7.4
  6. 0

    [JIRA] (JENKINS-37745) Tool installer prematurely connecting to download URLs on master

    Google Groups | 7 months ago | bwal...@cloudbees.com (JIRA)
    java.io.IOException: Failed to install &lt;tool url&gt; to &lt;file path&gt;

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Truncated TAR archive

      at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read()
    2. Apache Commons Compress
      TarArchiveInputStream.read
      1. org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:618)
      1 frame
    3. Java RT
      InputStream.read
      1. java.io.InputStream.read(InputStream.java:101)
      1 frame
    4. Commons IO
      IOUtils.copy
      1. org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
      2. org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
      3. org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
      3 frames
    5. Hudson
      FilePath.installIfNecessaryFrom
      1. hudson.util.IOUtils.copy(IOUtils.java:40)
      2. hudson.FilePath.readFromTar(FilePath.java:2279)
      3. hudson.FilePath.access$400(FilePath.java:195)
      4. hudson.FilePath$10.invoke(FilePath.java:724)
      5. hudson.FilePath$10.invoke(FilePath.java:722)
      6. hudson.FilePath.act(FilePath.java:996)
      7. hudson.FilePath.act(FilePath.java:974)
      8. hudson.FilePath.untarFrom(FilePath.java:722)
      9. hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
      10. hudson.FilePath.installIfNecessaryFrom(FilePath.java:762)
      10 frames
    6. org.jenkinsci.plugins
      GolangInstaller.performInstallation
      1. org.jenkinsci.plugins.golang.GolangInstaller.performInstallation(GolangInstaller.java:56)
      1 frame
    7. Hudson
      ToolInstallation.translateFor
      1. hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
      2. hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
      3. hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
      3 frames
    8. org.jenkinsci.plugins
      GolangBuildWrapper.setUp
      1. org.jenkinsci.plugins.golang.GolangInstallation.forNode(GolangInstallation.java:43)
      2. org.jenkinsci.plugins.golang.GolangBuildWrapper.setUp(GolangBuildWrapper.java:34)
      2 frames
    9. Hudson
      Executor.run
      1. hudson.model.Build$BuildExecution.doRun(Build.java:156)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      3. hudson.model.Run.execute(Run.java:1728)
      4. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      5. hudson.model.ResourceController.execute(ResourceController.java:98)
      6. hudson.model.Executor.run(Executor.java:404)
      6 frames