Error downloading patch into temporary file

Hi there, I have a problem while trying to run build. Its always the same error weather I try to run it on different agents on different machines. It was working OK like 2 weeks ago, and one day poof, sh.t happened.


[11:19:15][Publishing internal artifacts] Publishing 1 file using [WebPublisher]:
[11:19:15]Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[11:19:15]Checkout directory: D:\BuildAgent-03\work\3483c7b00633399b
[11:19:15]Updating sources: server side checkout (24s)
[11:19:16][Updating sources] Transferring cached clean patch for VCS root: Stage repo
[11:19:39][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, VCS root: "Stage repo" {instance id=1067, parent internal id=39, parent id=yyy_StageRepo, description: "ssh://git@xxx.com/vt/yyy.git#refs/heads/staging_R3.19RC5"}, due to error: Error while transferring cached patch
[11:19:39][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, due to error: java.io.IOException: Broken pipe
[11:19:40][Updating sources] Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp165891547033022205patch_28580": Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
[11:19:40]Will repeat attempt when server will be available, number of attempts left: 2
[11:19:50]Updating sources: server side checkout (25s)
[11:19:50][Updating sources] Transferring cached clean patch for VCS root: Stage repo
[11:20:14][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, VCS root: "Stage repo" {instance id=1067, parent internal id=39, parent id=yyy_StageRepo, description: "ssh://git@xxx.com/vt/yyy.git#refs/heads/staging_R3.19RC5"}, due to error: Error while transferring cached patch
[11:20:14][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, due to error: java.io.IOException: Broken pipe
[11:20:15][Updating sources] Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp7196293621812987183patch_28580": Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
[11:20:15]Will repeat attempt when server will be available, number of attempts left: 1
[11:20:25]Updating sources: server side checkout (22s)
[11:20:25][Updating sources] Transferring cached clean patch for VCS root: Stage repo
[11:20:46][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, VCS root: "Stage repo" {instance id=1067, parent internal id=39, parent id=yyy_StageRepo, description: "ssh://git@xxx.com/vt/yyy.git#refs/heads/staging_R3.19RC5"}, due to error: Error while transferring cached patch
[11:20:46][Updating sources] Failed to build patch for build #277 {build id=28580, buildTypeId=yyy_VtStage}, due to error: java.io.IOException: Broken pipe
[11:20:47][Updating sources] Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp4596586595144658072patch_28580": Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
[11:20:47]Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp4596586595144658072patch_28580": Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
[11:20:47]
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
    at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:152)
    at java.io.FilterInputStream.read(FilterInputStream.java:83)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:88)
    at jetbrains.buildServer.http.ServerStreamProvider$1.read(ServerStreamProvider.java:143)
    at java.io.InputStream.read(InputStream.java:170)
    at jetbrains.buildServer.util.TCStreamUtil.writeBinary(TCStreamUtil.java:78)
    at jetbrains.buildServer.agent.impl.patch.PatchStreamDownloader.copyStreamToFileAndCloseStream(PatchStreamDownloader.java:80)
    at jetbrains.buildServer.agent.impl.patch.PatchStreamDownloader.downloadPatch(PatchStreamDownloader.java:38)
    at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.downloadPatch(PatchDownloaderImpl.java:148)
    at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:60)
    at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyPatchToTempFile(UpdateSourcesPatcherBase.java:68)
    at jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromServer.updateSources(UpdateSourcesFromServer.java:45)
    at jetbrains.buildServer.agent.impl.patch.AbstractSourcesUpdater.doSourceUpdate(AbstractSourcesUpdater.java:47)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage$CheckoutAction.checkout(CheckoutSourcesBuildStage.java:114)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage.doCheckout(CheckoutSourcesBuildStage.java:81)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage.doRecoverableStage(CheckoutSourcesBuildStage.java:52)
    at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doLastAttempt(RecoverableBuildStage.java:112)
    at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doBuildStage(RecoverableBuildStage.java:70)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
    at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
    at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
    at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:75)
    at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:55)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:295)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:53)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:259)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:596)
    at sun.security.ssl.InputRecord.read(InputRecord.java:532)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:152)
    at java.io.FilterInputStream.read(FilterInputStream.java:83)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:88)
    at jetbrains.buildServer.http.ServerStreamProvider$1.read(ServerStreamProvider.java:143)
    at java.io.InputStream.read(InputStream.java:179)
    ... 24 more
[11:20:47]Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp4596586595144658072patch_28580"
[11:20:47]
jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$3: Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp4596586595144658072patch_28580"
    at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.downloadPatch(PatchDownloaderImpl.java:156)
    at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:60)
    at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyPatchToTempFile(UpdateSourcesPatcherBase.java:68)
    at jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromServer.updateSources(UpdateSourcesFromServer.java:45)
    at jetbrains.buildServer.agent.impl.patch.AbstractSourcesUpdater.doSourceUpdate(AbstractSourcesUpdater.java:47)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage$CheckoutAction.checkout(CheckoutSourcesBuildStage.java:114)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage.doCheckout(CheckoutSourcesBuildStage.java:81)
    at jetbrains.buildServer.agent.impl.patch.CheckoutSourcesBuildStage.doRecoverableStage(CheckoutSourcesBuildStage.java:52)
    at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doLastAttempt(RecoverableBuildStage.java:112)
    at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doBuildStage(RecoverableBuildStage.java:70)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
    at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
    at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
    at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
    at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:75)
    at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:55)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:295)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:53)
    at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:259)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
    at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:152)
    at java.io.FilterInputStream.read(FilterInputStream.java:83)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:88)
    at jetbrains.buildServer.http.ServerStreamProvider$1.read(ServerStreamProvider.java:143)
    at java.io.InputStream.read(InputStream.java:170)
    at jetbrains.buildServer.util.TCStreamUtil.writeBinary(TCStreamUtil.java:78)
    at jetbrains.buildServer.agent.impl.patch.PatchStreamDownloader.copyStreamToFileAndCloseStream(PatchStreamDownloader.java:80)
    at jetbrains.buildServer.agent.impl.patch.PatchStreamDownloader.downloadPatch(PatchStreamDownloader.java:38)
    at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.downloadPatch(PatchDownloaderImpl.java:148)
    ... 20 more
Caused by: javax.net.ssl.SSLException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:596)
    at sun.security.ssl.InputRecord.read(InputRecord.java:532)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
    at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
    at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:152)
    at java.io.FilterInputStream.read(FilterInputStream.java:83)
    at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:88)
    at jetbrains.buildServer.http.ServerStreamProvider$1.read(ServerStreamProvider.java:143)
    at java.io.InputStream.read(InputStream.java:179)
    ... 24 more
[11:20:59]Error downloading patch into temporary file "D:\BuildAgent-03\temp\buildTmp\temp4596586595144658072patch_28580"
[11:20:47]Publishing internal artifacts
[11:20:47][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]:
[11:20:47][Publishing internal artifacts] Publishing 1 file using [WebPublisher]:
[11:20:47]Build failed to start. Artifacts will not be published for this build
[11:20:47]Build finished

0
3 comments

Hi Franz,

which version of teamcity are you using? Also, did anything change in the last few weeks on the remote server or teamcity's side?

0
Avatar
Permanently deleted user

TeamCity Enterprise 2017.1.2 (build 46812)

Nothing much changed, only updated local bitbucket server. Which actually might be the problem ;)

Logs from VCS

[2018-03-20 14:50:55,202]   WARN -    jetbrains.buildServer.AGENT - Agent "Build-Agent-03" {id=6} tries to register while it is already registered. 
[2018-03-20 14:51:28,550]   WARN -   jetbrains.buildServer.SERVER - Unable to send patch to build agent "Build-Agent-03" {id=6}, running build "#2332 {build id=28716, buildTypeId=yyy_VtDev}", error: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe, see teamcity-vcs.log for more details 
[2018-03-20 14:50:52,364]   WARN [rmal executor 7] -      jetbrains.buildServer.VCS - Error while transferring cached patch for root "Dev repo" {instance id=1112, parent internal id=36, parent id=yyy_DevRepo, description: "ssh://xxx.com/VT/yyy.git#refs/heads/develop_VS2017"} from file '/mnt/sdb/TeamCityData/.BuildServer/system/caches/sources/5c0ac4f14a81db9e.cache': org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer 
[2018-03-20 14:50:52,365]   WARN [rmal executor 7] -      jetbrains.buildServer.VCS - Failed to build patch for build #2332 {build id=28716, buildTypeId=yyy_VtDev}, VCS root: "Dev repo" {instance id=1112, parent internal id=36, parent id=yyy_DevRepo, description: "ssh://git@xxx.com/VT/yyy.git#refs/heads/develop_VS2017"}, due to error: Error while transferring cached patch 

I have created a completely different project both in bitbucket and teamcity and everything went all right. I think it might be something with the branch size ? While im building test project ~100mb it is all OK, but this one from the post is ~750mb and here i get the above error.

Oh, and for the record, Agent Checkout is going smoothly.

0

Please check if there are any relevant errors regarding patch transferring in the teamcity-vcs.log on the TeamCity server machine. Also did you change any ssl related settings in TeamCity server? Do you have any proxy in front of TeamCity?

0

Please sign in to leave a comment.