[JIRA] [core] (JENKINS-21905) intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream

263 views
Skip to first unread message

mauritzhansen@yapedi.com (JIRA)

unread,
Oct 9, 2015, 6:42:03 AM10/9/15
to jenkinsc...@googlegroups.com
Mauritz Hansen reopened an issue
 

I am running version 1.630 and have the same issue.

  • I am running a master with 3 slaves
  • It is intermittent, around once every 40 runs (5 times daily). Cannot yet determine any pattern.
  • File being archived is small (less than 40 KB)

If anyone has any ideas on troubleshooting this or how to introduce debugging to get a reproducible case, I can try it on our servers.

The stacktrace is as follows:
Archiving artifacts
ERROR: Failed to archive artifacts: apache/logs/error_log
java.io.IOException: java.io.IOException: Failed to extract /jenkins/TWH/transfer of 1 files
at hudson.FilePath.readFromTar(FilePath.java:2301)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2210)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:75)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:186)
at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:160)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:134)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.readRecord(TarArchiveInputStream.java:419)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getRecord(TarArchiveInputStream.java:388)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:269)
at hudson.FilePath.readFromTar(FilePath.java:2279)
... 13 more

at hudson.FilePath.copyRecursiveTo(FilePath.java:2217)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:219)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:75)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: This archives contains unclosed entries.
at hudson.remoting.Channel$2.adapt(Channel.java:810)
at hudson.remoting.Channel$2.adapt(Channel.java:805)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2213)
... 12 more
Caused by: java.io.IOException: This archives contains unclosed entries.
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
at hudson.util.io.TarArchiver.close(TarArchiver.java:115)
at hudson.FilePath.writeToTar(FilePath.java:2264)
at hudson.FilePath.access$2100(FilePath.java:191)
at hudson.FilePath$45.invoke(FilePath.java:2203)
at hudson.FilePath$45.invoke(FilePath.java:2199)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2691)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to unit(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel$2.adapt(Channel.java:808)
... 15 more

Jenkins / Bug JENKINS-21905
intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream
Change By: Mauritz Hansen
Resolution: Cannot Reproduce
Status: Closed Reopened
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

liya@tikalk.com (JIRA)

unread,
Jan 6, 2016, 3:17:05 PM1/6/16
to jenkinsc...@googlegroups.com

liya@tikalk.com (JIRA)

unread,
Jan 6, 2016, 3:19:08 PM1/6/16
to jenkinsc...@googlegroups.com
Liya Katz commented on Bug JENKINS-21905
 
Re: intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream

experience the same issue on rhel slave
Jenkins 1.643
CopyArtifacts plugin 1.36.1

ERROR: Failed to archive artifacts: logs/*/
17:48:30 java.io.IOException: java.io.IOException: Failed to extract xxx transfer of 21 files
17:48:30 at hudson.FilePath.readFromTar(FilePath.java:2300)
17:48:30 at hudson.FilePath.copyRecursiveTo(FilePath.java:2209)
17:48:30 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
17:48:30 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
17:48:30 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
17:48:30 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
17:48:30 at hudson.model.Build$BuildExecution.post2(Build.java:185)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
17:48:30 at hudson.model.Run.execute(Run.java:1763)
17:48:30 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
17:48:30 at hudson.model.ResourceController.execute(ResourceController.java:98)
17:48:30 at hudson.model.Executor.run(Executor.java:410)
17:48:30 Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
17:48:30 at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:186)
17:48:30 at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
17:48:30 at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614)
17:48:30 at java.io.InputStream.read(InputStream.java:101)
17:48:30 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
17:48:30 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
17:48:30 at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
17:48:30 at hudson.util.IOUtils.copy(IOUtils.java:40)
17:48:30 at hudson.FilePath.readFromTar(FilePath.java:2290)
17:48:30 ... 13 more
17:48:30
17:48:30 at hudson.FilePath.copyRecursiveTo(FilePath.java:2216)
17:48:30 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
17:48:30 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
17:48:30 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
17:48:30 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
17:48:30 at hudson.model.Build$BuildExecution.post2(Build.java:185)
17:48:30 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
17:48:30 at hudson.model.Run.execute(Run.java:1763)
17:48:30 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
17:48:30 at hudson.model.ResourceController.execute(ResourceController.java:98)
17:48:30 at hudson.model.Executor.run(Executor.java:410)
17:48:30 Caused by: java.util.concurrent.ExecutionException: java.io.IOException: This archives contains unclosed entries.
17:48:30 at hudson.remoting.Channel$2.adapt(Channel.java:813)
17:48:30 at hudson.remoting.Channel$2.adapt(Channel.java:808)
17:48:30 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
17:48:30 at hudson.FilePath.copyRecursiveTo(FilePath.java:2212)
17:48:30 ... 12 more
17:48:30 Caused by: java.io.IOException: This archives contains unclosed entries.
17:48:30 at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
17:48:30 at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
17:48:30 at hudson.util.io.TarArchiver.close(TarArchiver.java:111)
17:48:30 at hudson.FilePath.writeToTar(FilePath.java:2263)
17:48:30 at hudson.FilePath.access$2100(FilePath.java:190)
17:48:30 at hudson.FilePath$45.invoke(FilePath.java:2202)
17:48:30 at hudson.FilePath$45.invoke(FilePath.java:2198)
17:48:30 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
17:48:30 at hudson.remoting.UserRequest.perform(UserRequest.java:120)
17:48:30 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
17:48:30 at hudson.remoting.Request$2.run(Request.java:326)
17:48:30 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
17:48:30 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
17:48:30 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
17:48:30 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
17:48:30 at java.lang.Thread.run(Thread.java:745)
17:48:30 at ......remote call to jslave-e2e-rhel-3(Native Method)
17:48:30 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
17:48:30 at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
17:48:30 at hudson.remoting.Channel$2.adapt(Channel.java:811)
17:48:30 ... 15 more
17:48:30 Build step 'Archive the artifacts' changed build result to FAILURE

Pogsquog@hotmail.com (JIRA)

unread,
Jan 13, 2016, 6:50:03 AM1/13/16
to jenkinsc...@googlegroups.com

I have the same or a very similar problem on a couple of my builds, running Jenkins 1.643 on Windows build nodes. The files I am attempting to archive add up to around 100Mb.

java.io.IOException: java.io.IOException: Failed to extract xxx/transfer of 8 files
at hudson.FilePath.readFromTar(FilePath.java:2300)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2209)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)


at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)

at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: java.io.EOFException
at hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:169)
at hudson.util.HeadBufferingStream.read(HeadBufferingStream.java:61)
at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:175)
at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614)
at java.io.InputStream.read(Unknown Source)
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:2290)
... 13 more
Caused by: java.io.EOFException
at org.jenkinsci.remoting.nio.NioChannelHub$3.run(NioChannelHub.java:613)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

at hudson.FilePath.copyRecursiveTo(FilePath.java:2216)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)


at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)

at hudson.model.Executor.run(Executor.java:410)
Caused by: java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: java.io.EOFException
at hudson.remoting.Request$1.get(Request.java:276)
at hudson.remoting.Request$1.get(Request.java:207)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2212)
... 12 more
Caused by: hudson.remoting.RequestAbortedException: java.io.EOFException
at hudson.remoting.Request.abort(Request.java:297)
at hudson.remoting.Channel.terminate(Channel.java:847)
at org.jenkinsci.remoting.nio.NioChannelHub$3.run(NioChannelHub.java:613)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
... 10 more

liya@tikalk.com (JIRA)

unread,
Jan 21, 2016, 9:05:07 AM1/21/16
to jenkinsc...@googlegroups.com

louisth@hotmail.com (JIRA)

unread,
Mar 1, 2016, 2:58:02 PM3/1/16
to jenkinsc...@googlegroups.com
Louis Thomas commented on Bug JENKINS-21905
 
Re: intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream

We ran into a similar (but not identical) problem. In diganosing, I noticed FilePath.writeToTar() eats the exception from scan() when there is a subsequent exception on close() (which there usually is). If writeToTar() were to report the first exception, it would probably make debugging easier.

 --- core/src/main/java/hudson/FilePath.java	(revision 48e42ae94a693a7d83c61ad0bb60f0ec397b5e8c)
+++ core/src/main/java/hudson/FilePath.java	(revision )
@@ -2257,11 +2257,24 @@
      */
     private Integer writeToTar(File baseDir, DirScanner scanner, OutputStream out) throws IOException {
         Archiver tw = ArchiverFactory.TAR.create(out);
+        IOException ioException = null;
         try {
             scanner.scan(baseDir,reading(tw));
+        } catch (IOException e) {
+            ioException = e;
         } finally {
+            try {
-            tw.close();
+                tw.close();
+            } catch (IOException e) {
+                // ignore the exception thrown by close if scan already threw an exception
+                if (null == ioException) {
+                    ioException = e;
-        }
+                }
+            }
+        }
+        if (null != ioException) {
+            throw ioException;
+        }
         return tw.countEntries();
     }

In our case, we did not have permissions to create a directory, which would have been more clear if the mkdir had reported an error.

 --- core/src/main/java/hudson/FilePath.java	(revision 48e42ae94a693a7d83c61ad0bb60f0ec397b5e8c)
+++ core/src/main/java/hudson/FilePath.java	(revision )
@@ -2281,7 +2294,7 @@
                     mkdirs(f);
                 } else {
                     File parent = f.getParentFile();
-                    if (parent != null) mkdirs(parent);
+                    if (parent != null) mkdirsE(parent);
                     writing(f);
 
                     if (te.isSymbolicLink()) {

louisth@hotmail.com (JIRA)

unread,
Mar 1, 2016, 2:59:03 PM3/1/16
to jenkinsc...@googlegroups.com
Louis Thomas edited a comment on Bug JENKINS-21905
We ran into a similar (but not identical) problem. In  diganosing  diagnosing , I noticed FilePath.writeToTar() eats the exception from scan() when there is a subsequent exception on close() (which there usually is). If writeToTar() were to report the first exception, it would probably make debugging easier.

{code}
{code}


In our case, we did not have permissions to create a directory, which would have been more clear if the mkdir had reported an error.

{code}

 --- core/src/main/java/hudson/FilePath.java (revision 48e42ae94a693a7d83c61ad0bb60f0ec397b5e8c)
+++ core/src/main/java/hudson/FilePath.java (revision )
@@ -2281,7 +2294,7 @@
                     mkdirs(f);
                 } else {
                     File parent = f.getParentFile();
-                    if (parent != null) mkdirs(parent);
+                    if (parent != null) mkdirsE(parent);
                     writing(f);
 
                     if (te.isSymbolicLink()) {
{code}

devld@ikedam.jp (JIRA)

unread,
Jul 8, 2016, 6:22:02 AM7/8/16
to jenkinsc...@googlegroups.com
ikedam updated an issue
 

Looks an issue of `FilePath` in Jenkins core.
Anyway, all reports are exceptions from artifactarchiver and doesn't look related to copyartifact.

Removed copyartifact from component/s.

Change By: ikedam
Component/s: copyartifact-plugin
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

michael.leister@oracle.com (JIRA)

unread,
Aug 5, 2016, 8:02:02 AM8/5/16
to jenkinsc...@googlegroups.com
Michael Leister commented on Bug JENKINS-21905
 
Re: intermittent Failed to archive artifacts: Failed to extract caused by Unexpected end of ZLIB input stream

We started having this issue a few weeks ago. It's random like others have stated, though it's happening enough to where it's a real problem. Not all builds have it but one in 5 or so do.

Using Jenkins 1.651.3. Had the problem when using 1.651.1 as well. The master server and all nodes that have experienced the problem are running Linux.

I can provide other details if it would help to diagnose and solve this problem. The issue seems to have started without updating anything within Jenkins (if I recall), so not sure if it's something in the files we are archiving (just log and XML files).

logan2211@gmail.com (JIRA)

unread,
Aug 5, 2016, 1:19:01 PM8/5/16
to jenkinsc...@googlegroups.com
Logan V commented on Bug JENKINS-21905

I'm seeing this on Jenkins 2.7.1

http://cdn.pasteraw.com/9pfrpe9kd82cbxj82revnqn6gs8ogvk

Roughly 40-50 files per build, all log files. We're seeing the failure about 75+% of the time.

michael.leister@oracle.com (JIRA)

unread,
Aug 12, 2016, 7:52:02 AM8/12/16
to jenkinsc...@googlegroups.com

Following up... We tracked down our issue to archiving of the log files only. We were archiving a 4-5 logs plus all JUnit XML files (couple thousand of them) and once we stopped saving the logs our builds didn't fail anymore. I started saving the logs by having them copied elsewhere via a post-build task. From there I found that it looked like some of the logs were still being written to when they were trying to be archived. I added a 60 second pause as the final build task before the post-build tasks and added back archiving of the logs...and then all the logs got archived again. We have run builds for 4-5 days without incident now. So apparently the issue (ours at least) was that the archiving wasn't waiting for the previous tasks to fully complete.

paresh.h.sao@gmail.com (JIRA)

unread,
Sep 22, 2016, 5:22:57 AM9/22/16
to jenkinsc...@googlegroups.com

I am using Jenkins for, openstack CI testing. And i am facing same issues. Out of 5 jobs, one of are failing because 'archiving artifacts', please provide any solution for this. It is very critical for us. The logs are below:

03:04:12 SSH: Transferred 52 file(s)
03:04:13 Archiving artifacts
03:04:13 ERROR: Failed to archive artifacts: *
03:04:13 java.io.IOException: java.io.IOException: Failed to extract /home/ubuntu/workspace/gate-tempest-ironic-ilo-driver-agent_ilo/transfer of 52 files
03:04:13 at hudson.FilePath.readFromTar(FilePath.java:2300)
03:04:13 at hudson.FilePath.copyRecursiveTo(FilePath.java:2209)
03:04:13 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
03:04:13 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
03:04:13 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
03:04:13 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
03:04:13 at hudson.model.Build$BuildExecution.post2(Build.java:185)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
03:04:13 at hudson.model.Run.execute(Run.java:1763)
03:04:13 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
03:04:13 at hudson.model.ResourceController.execute(ResourceController.java:98)
03:04:13 at hudson.model.Executor.run(Executor.java:410)
03:04:13 Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
03:04:13 at com.jcraft.jzlib.InflaterInputStream.fill(InflaterInputStream.java:186)
03:04:13 at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:106)
03:04:13 at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:614)
03:04:13 at java.io.InputStream.read(InputStream.java:101)
03:04:13 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
03:04:13 at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
03:04:13 at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
03:04:13 at hudson.util.IOUtils.copy(IOUtils.java:40)
03:04:13 at hudson.FilePath.readFromTar(FilePath.java:2290)
03:04:13 ... 13 more
03:04:13
03:04:13 at hudson.FilePath.copyRecursiveTo(FilePath.java:2216)
03:04:13 at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
03:04:13 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
03:04:13 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
03:04:13 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
03:04:13 at hudson.model.Build$BuildExecution.post2(Build.java:185)
03:04:13 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
03:04:13 at hudson.model.Run.execute(Run.java:1763)
03:04:13 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
03:04:13 at hudson.model.ResourceController.execute(ResourceController.java:98)
03:04:13 at hudson.model.Executor.run(Executor.java:410)
03:04:13 Caused by: java.util.concurrent.ExecutionException: java.io.IOException: This archives contains unclosed entries.
03:04:13 at hudson.remoting.Channel$2.adapt(Channel.java:813)
03:04:13 at hudson.remoting.Channel$2.adapt(Channel.java:808)
03:04:13 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
03:04:13 at hudson.FilePath.copyRecursiveTo(FilePath.java:2212)
03:04:13 ... 12 more
03:04:13 Caused by: java.io.IOException: This archives contains unclosed entries.
03:04:13 at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
03:04:13 at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
03:04:13 at hudson.util.io.TarArchiver.close(TarArchiver.java:111)
03:04:13 at hudson.FilePath.writeToTar(FilePath.java:2263)
03:04:13 at hudson.FilePath.access$2100(FilePath.java:190)
03:04:13 at hudson.FilePath$45.invoke(FilePath.java:2202)
03:04:13 at hudson.FilePath$45.invoke(FilePath.java:2198)
03:04:13 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
03:04:13 at hudson.remoting.UserRequest.perform(UserRequest.java:120)
03:04:13 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
03:04:13 at hudson.remoting.Request$2.run(Request.java:332)
03:04:13 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
03:04:13 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
03:04:13 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
03:04:13 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
03:04:13 at java.lang.Thread.run(Thread.java:745)
03:04:13 at ......remote call to jenkins-slave3-gen9(Native Method)
03:04:13 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
03:04:13 at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
03:04:13 at hudson.remoting.Channel$2.adapt(Channel.java:811)
03:04:13 ... 15 more
03:04:13 Build step 'Archive the artifacts' changed build result to FAILURE
03:04:13 Finished: FAILURE

besifany@hotmail.com (JIRA)

unread,
Nov 28, 2016, 5:21:02 AM11/28/16
to jenkinsc...@googlegroups.com

trejkaz@java.net (JIRA)

unread,
Nov 28, 2016, 6:09:02 PM11/28/16
to jenkinsc...@googlegroups.com

danek.duvall@oracle.com (JIRA)

unread,
Jan 5, 2017, 5:51:26 PM1/5/17
to jenkinsc...@googlegroups.com

I'd been seeing this consistently, but the issue for me was that the files being archived weren't readable by the jenkins slave. After having the build script do a chown (a chmod would have done) to the right user, the error went away. I'm adding this so that anyone else who might be having the same issue will see this, as this issue comes up near the top of a google search for the key bits in the error output.

Reply all
Reply to author
Forward
0 new messages