-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting and FAQs
Bacchus Jackson (BJaX) edited this page Aug 1, 2024
·
1 revision
Condition:
Attempted to archive a file or directory using archiveArtifacts
archiveArtifacts artifacts: 'some-file.txt', allowEmptyArchive: true
Example Error:
hudson.remoting.ProxyException: java.io.IOException: Truncated TAR archive
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:639)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:106)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1483)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1107)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1456)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1085)
at hudson.util.IOUtils.copy(IOUtils.java:53)
at hudson.FilePath.readFromTar(FilePath.java:3093)
Also: Also: hudson.remoting.ProxyException: java.io.IOException: This archive contains unclosed entries.
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:419)
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:303)
at hudson.util.io.TarArchiver.close(TarArchiver.java:128)
at hudson.FilePath.writeToTar(FilePath.java:3059)
Also: hudson.remoting.ProxyException: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip-100-85-36-130.ec2.internal/100.85.36.130:42738
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1787)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel$2.adapt(Channel.java:1037)
at hudson.remoting.Channel$2.adapt(Channel.java:1033)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:66)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2856)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:73)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:257)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
hudson.remoting.ProxyException: java.io.IOException: Entry 'virus-report.clamav.txt' closed at '0' before the '373' bytes specified in the header were written
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry(TarArchiveOutputStream.java:330)
at hudson.util.io.TarArchiver.visit(TarArchiver.java:121)
at hudson.util.DirScanner.scanSingle(DirScanner.java:52)
at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:3692)
at hudson.FilePath.writeToTar(FilePath.java:3060)
at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:3025)
at hudson.FilePath$CopyRecursiveRemoteToLocal.invoke(FilePath.java:3008)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3613)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:377)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:137)
Caused: hudson.remoting.ProxyException: java.util.concurrent.ExecutionException: java.io.IOException: Entry 'virus-report.clamav.txt' closed at '0' before the '373' bytes specified in the header were written
at hudson.remoting.Channel$2.adapt(Channel.java:1039)
at hudson.remoting.Channel$2.adapt(Channel.java:1033)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:66)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2856)
Also: hudson.remoting.ProxyException: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: fa29b4d1-83f8-408f-8dc3-507a025e16cd
Caused: hudson.remoting.ProxyException: java.io.IOException: Failed to extract /home/jenkins/agent/workspace/Go Server Delivery/transfer of 1 files
at hudson.FilePath.readFromTar(FilePath.java:3103)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2853)
at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:73)
at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:257)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Finished: FAILURE
Cause:
The archiveArtifacts
function runs with different permissions than sh
which could potentially cause a lack of access to the file or directory.
Resolution: Check and update the permissions / ownership of the file.
chmod a+r some-file.txt