Patch Broken / Failed to Build Patch - Build Errors

I am not very familiar with TC. I've inherited a project which has been using TC for years and although I've been deploying updates using TC for a couple months now, all of a sudden we've been having difficulty. Over the past week, deployments were getting slow and then, 3 days ago, stopped working at all.Thank you very much for your help with this!

The error log shows:

[16:38:25]: Patch is broken, can be found in file: C:\TeamCity\buildAgent\temp\cache\temp7451982407726665153patch_1193

[16:38:25]: Failed to build patch for build #356 {build id=1193}, VCS root: svn: https://svn.server.com/svn/project/WebsiteSolution/trunk/ {instance id=2, parent id=1}, due to error: org.tmatesoft.svn.core.SVNException: svn: Connection reset

svn: REPORT request failed on '/svn/project/!svn/vcc/default'

jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again.

 at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:113)

 at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:103)

 at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:64)

 at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyPatchToTempFile(UpdateSourcesPatcherBase.java:70)

 at jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromServer.updateSources(UpdateSourcesFromServer.java:62)

 at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doSourceUpdate(UpdateSourcesBuildStageBase.java:91)

 at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doRecoverableStage(UpdateSourcesBuildStageBase.java:59)

 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:29)

 at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)

 at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)

 at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)

 at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:65)

 at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:52)

 at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:245)

 at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:50)

 at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:218)

 at java.lang.Thread.run(Unknown Source)

Caused by: jetbrains.buildServer.vcs.patches.UnsuccessfulPatchException: Failed to build patch for build #356 {build id=1193}, VCS root: svn: https://svn.server.com/svn/project/WebsiteSolution/trunk/ {instance id=2, parent id=1}, due to error: org.tmatesoft.svn.core.SVNException: svn: Connection reset

svn: REPORT request failed on '/svn/project/!svn/vcc/default'

 at jetbrains.buildServer.vcs.patches.AbstractPatcher$1.fail(AbstractPatcher.java:93)

 at jetbrains.buildServer.vcs.patches.LowLevelPatcher.readPatchStream(LowLevelPatcher.java:156)

 at jetbrains.buildServer.vcs.patches.LowLevelPatcher.applyPatch(LowLevelPatcher.java:79)

 at jetbrains.buildServer.vcs.patches.AbstractPatcher.applyPatch(AbstractPatcher.java:42)

 at jetbrains.buildServer.agent.impl.patch.PatchApplierImpl.applyPatch(PatchApplierImpl.java:18)

 at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatchInFileIsCompleted(PatchDownloaderImpl.java:83)

 at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:93)

 ... 18 more

1 comment
Comment actions Permalink

I've had similiar exception ("Cannot build patch...") with Git after upgrade form Teamcity 7 to TeamCity 8.0.3.
Solution:
- navigate to VSC root configuration tab
- find  "Default branch" text field
- change from "master" to "refs/heads/master"

Hope this will help!

0

Please sign in to leave a comment.