添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account Agent could not fetch artifact - Premature end of Content-Length delimited message body - Large file #9337 Agent could not fetch artifact - Premature end of Content-Length delimited message body - Large file #9337 badbort opened this issue May 20, 2021 · 2 comments
Summary

Agent fails to fetch very large artifacts. My use case is working with 3d models and we do end up with very large files for certain clients.

The artifacts are 2 files from the previous stage. Together is very large in size as seen in the below image.

The artifacts from the prevous stage successfully uploaded to my gocd server, and I can see the server contains these files in artifacts\pipelines<pipeline name>\ect...

I can also confirm that the zip cache exists and is not corrupted. I can download it and extract without issue, so the artifacts are intact on the server from what I can see. See the server cache zip of these artifacts:

Console output displayed on browser page:

[go] Fetching artifact [Export] from [PipelineName/11/StageName/latest/JobName]
[go] Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 12 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
[go] Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 21 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
[go] Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 31 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
[go] Failed to save artifact [Export] to []
Environment
Server Info
Go Server Version:
20.4.0 (11749-5553066d29d315951efa5ead0c087374df6338b9)
JVM version:
13.0.2
OS Information:
Windows 10 10.0
Usable space in artifacts repository:
1.27 TB
Pipelines Count:
Basic environment details
  • Go Version: Available in the footer
  • JAVA Version: Available from http://<go-server-host>/go/about
  • OS: Available from http://<go-server-host>/go/about
  • Browser vendor and version (if relevant): Hopefully not Internet Explorer 7 :)
  • Actual Results

    GoCD Agent log:

    2021-05-20 08:40:41,601 INFO  [scheduler-3] PerfTimer:52 - Performance: Downloading from url [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/cruise-output/md5.checksum] took 3ms
    2021-05-20 08:40:41,601 INFO  [scheduler-3] ChecksumFileHandler:62 - [Agent Fetch Artifact] Saved checksum property file [pipelines\PipelineName\PipelineName_Navisworks_NavisworksExport_md5.checksum]
    2021-05-20 08:40:41,607 INFO  [scheduler-3] HttpService:125 - Got back 200 from server
    2021-05-20 08:40:41,607 INFO  [scheduler-3] PerfTimer:52 - Performance: Downloading from url [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip] took 2ms
    2021-05-20 08:40:41,607 INFO  [scheduler-3] DirHandler:56 - [Agent Fetch Artifact] Downloading from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Will read from Socket stream to compute MD5 and write to file
    2021-05-20 08:40:48,749 INFO  [pool-12-thread-1] HttpService:125 - Got back 200 from server
    2021-05-20 08:43:40,077 INFO  [scheduler-3] DirHandler:60 - [Agent Fetch Artifact] Downloading a directory from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Handling the entry: 'Export/1of2.Stress Test - May 12 2021.nwd.fbx'
    2021-05-20 08:44:51,908 ERROR [scheduler-3] ZipUtil:159 - Failed to unzip file [Export/2of2.161000-232-20m-8005.nwd.fbx] to directory [D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:44:51,908 ERROR [scheduler-3] HttpService:109 - Error while downloading [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:44:51,908 WARN  [scheduler-3] DownloadAction:69 - Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 12 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
    2021-05-20 08:44:58,744 INFO  [pool-12-thread-1] HttpService:125 - Got back 200 from server
    2021-05-20 08:45:03,928 INFO  [scheduler-3] HttpService:125 - Got back 200 from server
    2021-05-20 08:45:03,928 INFO  [scheduler-3] PerfTimer:52 - Performance: Downloading from url [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip] took 20ms
    2021-05-20 08:45:03,928 INFO  [scheduler-3] DirHandler:56 - [Agent Fetch Artifact] Downloading from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Will read from Socket stream to compute MD5 and write to file
    2021-05-20 08:48:10,983 INFO  [scheduler-3] DirHandler:60 - [Agent Fetch Artifact] Downloading a directory from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Handling the entry: 'Export/1of2.Stress Test - May 12 2021.nwd.fbx'
    2021-05-20 08:49:26,867 ERROR [scheduler-3] ZipUtil:159 - Failed to unzip file [Export/2of2.161000-232-20m-8005.nwd.fbx] to directory [D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:49:26,867 ERROR [scheduler-3] HttpService:109 - Error while downloading [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:49:26,867 WARN  [scheduler-3] DownloadAction:69 - Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 21 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
    2021-05-20 08:49:28,740 INFO  [pool-12-thread-1] HttpService:125 - Got back 200 from server
    2021-05-20 08:49:47,882 INFO  [scheduler-3] HttpService:125 - Got back 200 from server
    2021-05-20 08:49:47,882 INFO  [scheduler-3] PerfTimer:52 - Performance: Downloading from url [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip] took 0ms
    2021-05-20 08:49:47,882 INFO  [scheduler-3] DirHandler:56 - [Agent Fetch Artifact] Downloading from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Will read from Socket stream to compute MD5 and write to file
    2021-05-20 08:53:04,819 INFO  [scheduler-3] DirHandler:60 - [Agent Fetch Artifact] Downloading a directory from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Handling the entry: 'Export/1of2.Stress Test - May 12 2021.nwd.fbx'
    2021-05-20 08:54:17,756 ERROR [scheduler-3] ZipUtil:159 - Failed to unzip file [Export/2of2.161000-232-20m-8005.nwd.fbx] to directory [D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:54:17,756 ERROR [scheduler-3] HttpService:109 - Error while downloading [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:54:17,756 WARN  [scheduler-3] DownloadAction:69 - Could not fetch artifact http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip. Pausing 31 seconds to retry. Error was : Caught an exception 'Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268904960'
    2021-05-20 08:54:18,730 INFO  [pool-12-thread-1] HttpService:125 - Got back 200 from server
    2021-05-20 08:54:48,765 INFO  [scheduler-3] HttpService:125 - Got back 200 from server
    2021-05-20 08:54:48,765 INFO  [scheduler-3] PerfTimer:52 - Performance: Downloading from url [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip] took 0ms
    2021-05-20 08:54:48,765 INFO  [scheduler-3] DirHandler:56 - [Agent Fetch Artifact] Downloading from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Will read from Socket stream to compute MD5 and write to file
    2021-05-20 08:57:51,955 INFO  [scheduler-3] DirHandler:60 - [Agent Fetch Artifact] Downloading a directory from 'Export' to 'D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName'. Handling the entry: 'Export/1of2.Stress Test - May 12 2021.nwd.fbx'
    2021-05-20 08:59:04,915 ERROR [scheduler-3] ZipUtil:159 - Failed to unzip file [Export/2of2.161000-232-20m-8005.nwd.fbx] to directory [D:\Agents\go-agent-20.6.0-1\pipelines\PipelineName]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268937728
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:59:04,915 ERROR [scheduler-3] HttpService:109 - Error while downloading [http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip]
    org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 15337680741; received: 15268937728
    	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
    	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at java.base/java.io.PushbackInputStream.read(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source)
    	at java.base/java.util.zip.InflaterInputStream.read(Unknown Source)
    	at java.base/java.util.zip.ZipInputStream.read(Unknown Source)
    	at java.base/java.io.FilterInputStream.read(Unknown Source)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
    	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
    	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
    	at com.thoughtworks.go.util.ZipUtil.extractTo(ZipUtil.java:141)
    	at com.thoughtworks.go.util.ZipUtil.unzip(ZipUtil.java:119)
    	at com.thoughtworks.go.domain.DirHandler.handle(DirHandler.java:62)
    	at com.thoughtworks.go.util.HttpService.download(HttpService.java:102)
    	at com.thoughtworks.go.domain.DownloadAction.download(DownloadAction.java:73)
    	at com.thoughtworks.go.domain.DownloadAction.perform(DownloadAction.java:47)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.pullArtifact(FetchArtifactBuilder.java:65)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.downloadArtifact(FetchArtifactBuilder.java:56)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.fetch(FetchArtifactBuilder.java:51)
    	at com.thoughtworks.go.publishers.GoArtifactsManipulator.fetch(GoArtifactsManipulator.java:168)
    	at com.thoughtworks.go.work.DefaultGoPublisher.fetch(DefaultGoPublisher.java:72)
    	at com.thoughtworks.go.domain.builder.FetchArtifactBuilder.build(FetchArtifactBuilder.java:46)
    	at com.thoughtworks.go.remote.work.Builders.build(Builders.java:73)
    	at com.thoughtworks.go.remote.work.BuildWork.execute(BuildWork.java:208)
    	at com.thoughtworks.go.remote.work.BuildWork.buildJob(BuildWork.java:181)
    	at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:129)
    	at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:79)
    	at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:53)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:147)
    	at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:119)
    	at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:84)
    	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
    	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    2021-05-20 08:59:04,915 ERROR [scheduler-3] DownloadAction:57 - Giving up fetching resource 'http://icarus2:8153/go/remoting/files/PipelineName/11/StageName/latest/JobName/Export.zip'. Tried 4 times and failed.
    

    The only relevant server logs I could find:

    2021-05-20 16:46:23,517 INFO  [qtp1676162792-2392176] ArtifactsController:274 - [Artifact Download] Trying to resolve 'Export.zip' for 'PipelineName/11/StageName/latest/JobName'
    2021-05-20 16:46:23,519 INFO  [qtp1676162792-2392176] ArtifactsController:292 - [Artifact Download] Successfully resolved 'Export.zip' for 'PipelineName/11/StageName/latest/JobName'. It took: 1ms
    2021-05-20 16:46:23,520 INFO  [qtp1676162792-2392176] FileView:115 - [Artifact Download] About to download: G:\artifacts\cache\artifacts\pipelines\PipelineName\11\Navisworks\1\NavisworksExport\Export.zip. ShouldZip? = false
              

    Not sure why it fails to download, but at these sizes, a custom written artifact plugin will probably allow more flexibility.

    For instance, if there is some kind of shared storage between the agent and the server, then this process would be much faster. If an earlier stage creates these, then the plugin could upload it to the shared storage, which the agent can then access, without you (or the job) having to upload it to the GoCD server and then downloading it from the server.

    This issue has been automatically marked as stale because it has not had activity in the last 90 days.
    If you can still reproduce this error on the master branch using local development environment or on the latest GoCD Release, please reply with all of the information you have about it in order to keep the issue open.
    Thank you for all your contributions.