Problems with agent checkout

Hi there,

I recently switched to agent checkout for a few of the teamcity projects
(after repeatedly having the server checkout miss sending changes to the
agents). Now I get, out of the blue, some failures when the agent tries to
update the sources. The thing is not consistent, and a "clean sources" action
solves it, but it's not inspiring much trust, either.

Here's what the log complains about:

jetbrains.buildServer.vcs.VcsException: org.tmatesoft.svn.core.SVNException:
svn: Cannot create new file 'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
jetbrains.buildServer.vcs.VcsException: org.tmatesoft.svn.core.SVNException:
svn: Cannot create new file 'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:74)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.checkoutSources(GetProjectSources.java:272)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(GetProjectSources.java:98)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$BuildRunAction.run(BuildAgentImpl.java:1033)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.tmatesoft.svn.core.SVNException: svn: Cannot create new file
'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createEmptyFile(SVNFileUtil.java:163)
at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea14.createVersionedDirectory(SVNAdminArea14.java:1400)
at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea14Factory.doCreateVersionedDirectory(SVNAdminArea14Factory.java:36)
at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.createVersionedDirectory(SVNAdminAreaFactory.java:181)
at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.createVersionedDirectory(SVNAdminAreaFactory.java:188)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:324)
at jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpdateClient.java:49)
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:47)
... 4 more

Another weird thing is that all the builds complain about:
: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
: Unable to cleanup build temporary directory

But this thing does not seem to cause any issues, the builds go ahead after
that.

Any ideas?

Thx,
Andrei




3 comments

Actually, this is happening every other build. The first one (after cleaning
the sources) works OK, while the next one running on the same agent fails
with the exception below. I'm trying with default checkout directory now,
to see if it makes a difference.

The only other thing will be to clean sources before every run, but that
means a full check out every build, which really slows things down (not to
mention the load on the subversion server).

It must be some weird setting on our side, but really can't figure out what
can cause it.

Any ideas would be appreciated.

Thx,
Andrei



AO>
AO> I recently switched to agent checkout for a few of the teamcity
AO> projects (after repeatedly having the server checkout miss sending
AO> changes to the agents). Now I get, out of the blue, some failures
AO> when the agent tries to update the sources. The thing is not
AO> consistent, and a "clean sources" action solves it, but it's not
AO> inspiring much trust, either.
AO>
AO> Here's what the log complains about:
AO>
AO> jetbrains.buildServer.vcs.VcsException:
AO> org.tmatesoft.svn.core.SVNException:
AO>
AO> svn: Cannot create new file
AO> 'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
AO>
AO> jetbrains.buildServer.vcs.VcsException:
AO> org.tmatesoft.svn.core.SVNException:
AO>
AO> svn: Cannot create new file
AO> 'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
AO>
AO> at
AO> jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSource
AO> s(SvnCheckoutOnAgentSupport.java:74)
AO>
AO> at
AO> jetbrains.buildServer.agent.impl.patch.GetProjectSources.checkoutSou
AO> rces(GetProjectSources.java:272)
AO>
AO> at
AO> jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(Get
AO> ProjectSources.java:98)
AO>
AO> at
AO> jetbrains.buildServer.agent.impl.BuildAgentImpl$BuildRunAction.run(B
AO> uildAgentImpl.java:1033)
AO>
AO> at java.lang.Thread.run(Thread.java:595)
AO>
AO> Caused by: org.tmatesoft.svn.core.SVNException: svn: Cannot create
AO> new file
AO>
AO> 'C:\TeamCity\BuildAgent\work\source\Java\.svn\lock'
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorMan
AO> ager.java:55)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorMan
AO> ager.java:40)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createEmptyFile(SVNFi
AO> leUtil.java:163)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea14.createVersio
AO> nedDirectory(SVNAdminArea14.java:1400)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea14Factory.doCre
AO> ateVersionedDirectory(SVNAdminArea14Factory.java:36)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.createV
AO> ersionedDirectory(SVNAdminAreaFactory.java:181)
AO>
AO> at
AO> org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.createV
AO> ersionedDirectory(SVNAdminAreaFactory.java:188)
AO>
AO> at
AO> org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient
AO> .java:324)
AO>
AO> at
AO> jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpda
AO> teClient.java:49)
AO>
AO> at
AO> jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSource
AO> s(SvnCheckoutOnAgentSupport.java:47)
AO>
AO> ... 4 more
AO>
AO> Another weird thing is that all the builds complain about:
AO> : Clearing temporary directory:
AO> C:\TeamCity\buildAgent\temp\buildTmp
AO> : Unable to cleanup build temporary directory
AO> But this thing does not seem to cause any issues, the builds go
AO> ahead after that.
AO>
AO> Any ideas?
AO>
AO> Thx,
AO> Andrei


0

Just to follow up on this:

AO> Actually, this is happening every other build. The first one (after
AO> cleaning the sources) works OK, while the next one running on the
AO> same agent fails with the exception below. I'm trying with default
AO> checkout directory now, to see if it makes a difference.
AO>

This did help, the error went away when I switched to using the default checkout
directory. The main difference, from what I can see, was that my checkout
directory wasn't at the first level (it was source/Java).

Best,
Andrei


0

Andrei,

Did you have the same checkout directory specified for several build configurations?
Can you check were there any processes running on the machine that access the directory during the error occurrence? (You can use ProcessExplorer for finding processes that opened a file C:\TeamCity\BuildAgent\work\source\Java\.svn\lock )

--
Best regards,

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

0

Please sign in to leave a comment.