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

Cannot archive big remote log files using "Archive the artifacts" post-build action

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None

      Using "Archive the artifacts" post-build action, the following kind of issues often occurs:

      12:11:29 Archiving artifacts
      12:11:29 ERROR: Failed to archive artifacts: testing/logs/**
      12:11:29 hudson.util.IOException2: java.io.IOException: request to write '2134' bytes exceeds size in header of '852381' bytes for entry 'testing/error.log'
      12:11:29 at hudson.FilePath.copyRecursiveTo(FilePath.java:1863)
      12:11:29 at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:116)
      12:11:29 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      12:11:29 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:807)
      12:11:29 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:782)
      12:11:29 at hudson.model.Build$BuildExecution.post2(Build.java:183)
      12:11:29 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:729)
      12:11:29 at hudson.model.Run.execute(Run.java:1541)
      12:11:29 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      12:11:29 at hudson.model.ResourceController.execute(ResourceController.java:88)
      12:11:29 at hudson.model.Executor.run(Executor.java:236)
      12:11:29 Caused by: java.util.concurrent.ExecutionException: java.io.IOException: request to write '2134' bytes exceeds size in header of '852381' bytes for entry 'testing/error.log'
      12:11:29 at hudson.remoting.Channel$4.adapt(Channel.java:697)
      12:11:29 at hudson.remoting.Channel$4.adapt(Channel.java:692)
      12:11:29 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
      12:11:29 at hudson.FilePath.copyRecursiveTo(FilePath.java:1861)
      12:11:29 ... 10 more
      12:11:29 Caused by: java.io.IOException: request to write '2134' bytes exceeds size in header of '852381' bytes for entry 'testing/error.log'
      12:11:29 at hudson.org.apache.tools.tar.TarOutputStream.write(TarOutputStream.java:284)
      12:11:29 at hudson.util.io.TarArchiver.visit(TarArchiver.java:115)
      12:11:29 at hudson.util.DirScanner$Glob.scan(DirScanner.java:133)
      12:11:29 at hudson.FilePath.writeToTar(FilePath.java:1899)
      12:11:29 at hudson.FilePath.access$1000(FilePath.java:166)
      12:11:29 at hudson.FilePath$36.invoke(FilePath.java:1840)
      12:11:29 at hudson.FilePath$36.invoke(FilePath.java:1837)
      12:11:29 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2308)
      12:11:29 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      12:11:29 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      12:11:29 at hudson.remoting.Request$2.run(Request.java:326)
      12:11:29 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      12:11:29 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      12:11:29 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      12:11:29 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      12:11:29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      12:11:29 at java.lang.Thread.run(Thread.java:662)

      Please notice that during the same run, other log files are correctly archived.

      I haven't found any possible reason so far. Could such issue happen if we try to archive a file which is still being written?

      Is this post-build task the correct one to use to save log files?

      Thanks for your help,
      David.

            Unassigned Unassigned
            dcatalan david catalan
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: