Subversion checkout fails on TeamCity 4.0 (build 7904): Error while applying patch

I use TeamCity 4.0 (build 7904).
After migration from cvs to svn we got such a problem - TeamCity starts getting changes, is doing it for about 5 minutes, and then failes with error:

[13:07:01]: Checking for changes
[13:07:01]: Checkout directory: /opt/gftcc/teamcity/work/f92b3fa5a715347b
[13:12:01]: Error while applying patch: Server returned status code 502, reason: Proxy Error
[13:12:01]: Build finished

In teamcity-agent.log I found this:
[2009-01-21 13:12:01,901]   WARN -    jetbrains.buildServer.AGENT - Exception occured while patch applying:Server returned status code 502, reason: Proxy Error
java.io.IOException: Server returned status code 502, reason: Proxy Error
        at jetbrains.buildServer.agent.impl.ServerStreamProvider.getStream(ServerStreamProvider.java:54)
        at jetbrains.buildServer.agent.impl.patch.PatchStreamProviderImpl.getPatchesStream(PatchStreamProviderImpl.java:41)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources.loadAndApplyPatch(GetProjectSources.java:173)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources.access$300(GetProjectSources.java:23)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources$3.execute(GetProjectSources.java:300)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources.executePatchProcess(GetProjectSources.java:123)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources.applyPatch(GetProjectSources.java:298)
        at jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(GetProjectSources.java:85)
        at jetbrains.buildServer.agent.impl.runStages.GetSourcesStage.doBuildStage(GetSourcesStage.java:31)
        at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:108)
        at jetbrains.buildServer.agent.impl.BuildRunAction.run(BuildRunAction.java:74)
        at java.lang.Thread.run(Thread.java:619)

I haven't found what is patch file and why it's applying fails. Can you help with it?

Thanks

6 comments
Comment actions Permalink

Ekaterina,

The error indicates that there are connection problems between agent and TeamCity server. Agent tries to got the changes from the server in a "patch" file. The file downloading fails with 502 error. Most probably you have a proxy server between the agent and server and it reports the error. The patch file size may be quite big (this depends on the size of your codebase).

If you believe it is not a fault of the proxy server, please send us the server logs (temacity-server.log, teamcity-vcs.log) for the moment of failure.

As a workaround you can try to switch to agent-side checkout.

BTW you are using pre-release build of TeamCIty, please consider upgrading to TeamCity 4.0.1.

--
Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks for your reply.

It's strange, that we didn't have this problem using cvs, isn't it? Is this patch applying when TeamCity uses cvs?

I looked for logs, but teamcity-vcs.log is empty, and I don't see teamcity-server.log at all.

I tryed to switch to "Automatically on agent", but in this case TeamCity worked for about a half of an hour, and I got this in log:

[18:10:01]: Checking for changes
[18:10:02]: Checkout directory: /opt/gftcc/teamcity/work/91e68c12c52569fa
[18:10:02]: Clearing /opt/gftcc/teamcity/work/91e68c12c52569fa
[18:10:02]: Checking /opt/gftcc/teamcity/work/91e68c12c52569fa out from svn
[18:37:12]: Unexpected error: Java heap space
[18:37:12]: java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at org.tmatesoft.svn.core.SVNErrorMessage.getFullMessage(SVNErrorMessage.java:256)
at org.tmatesoft.svn.core.SVNException.getMessage(SVNException.java:79)
at java.lang.Throwable.getLocalizedMessage(Throwable.java:266)
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:81)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.checkoutSources(GetProjectSources.java:267)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(GetProjectSources.java:89)
at jetbrains.buildServer.agent.impl.runStages.GetSourcesStage.doBuildStage(GetSourcesStage.java:31)
at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:108)
at jetbrains.buildServer.agent.impl.BuildRunAction.run(BuildRunAction.java:74)
at java.lang.Thread.run(Thread.java:619)

[18:37:12]: Build finished


We are going to upgrade to TeamCity 4.0.1, do you suppose the problem may be dealt with using pre-relase build of TeamCity?

0
Comment actions Permalink

Many thanks for your reply, it really helped!

We checked carefully our setting and tryed not to use proxy, but set direct link, and it helped.

0
Comment actions Permalink

Hello Ekaterina,

   Could you please check whether the OutOfMemory error is reproducable and if yes, please send us memory dump as described at http://www.jetbrains.net/confluence/display/TCD4/Reporting%20Issues#ReportingIssues-OutOfMemoryProblems .

   Thanks!

   KIR

0
Comment actions Permalink

Hi Kirill!
Sorry for delay, I remember about your question, but I haven't checked it yet.
I'll check in a couple of days and report you about the result.

0
Comment actions Permalink

Hi Kirill!
I've checked whether the OutOfMemory error is reproducable just now, and it isn't.

Sorry for delay.

0

Please sign in to leave a comment.