Subversion checkout fails on TeamCity 3.1.2 after first build


running a build with TeamCity on Linux (Fedora FC6) works fine for the first time after the agent has been started. Subsequent runs of the same build produce the error below.
I considered a permission problem but the process is running with root permissions. Further, lsof shows now handles being open in this directory.
The same configuration runs fine on a Windows agent.
Any ideas how I can solve this problem without restarting the agent between each build?

[15:45:53]: Checking for changes
[15:45:54]: Clearing temporary directory: /opt/TeamCityAgent/temp/buildTmp
[15:45:54]: Checkout directory: /opt/TeamCityAgent/work/544adaa8effab590
[15:45:54]: Updating project sources
[15:45:54]: Clearing /opt/TeamCityAgent/work/544adaa8effab590
[15:45:54]: Checking /opt/TeamCityAgent/work/544adaa8effab590 out from svn
[15:45:54]: jetbrains.buildServer.vcs.VcsException: No such file or directory
jetbrains.buildServer.vcs.VcsException: No such file or directory
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.checkoutSources(
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(
at jetbrains.buildServer.agent.impl.BuildAgentImpl$
Caused by: No such file or directory
at Method)
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(
... 4 more
[15:45:54]: Build finished
Comment actions Permalink

Hello mikeka!

  Please provide more details about your setup:
  - VCS settings
  - Checkout rules
  - Build log for your successfuil build on Windows and on Linux machines.
  - buildAgent/log/teamcity-agent.log for the failing and successful build

  We will try to figure out what's going on.

  In fact, TeamCity 4.0.1 is out (and 4.0.2 is going to be released in this month) so I'd strongly suggest to upgrade.
  Kind regards,

Comment actions Permalink

Hi Kirill,

frist off, thanks for your quick response and sorry for my late reply.

I am aware that there is a newer version. However we had the same problem on previous TeamCity versions as well, so isn't it unlikely that it is a bug which was just introduced with 3.1.2?
But of course, upgrading is an option we're considering if all else fails.

-VCS settings
subversion via ssh using password
using default config dir
ignoring externals
labeling rules:
checking interval 120 sec (global setting)

-checkout rules

-checkout settings
automatically on agent, to default dir of agent
no default cleanup
no labeling

hope this helps,

Comment actions Permalink

Hello Michael,

  I suspect that your build deletes a temporary directory while building, and this directory is recreated only after build agent restart.
  Could you please try running a fake empty build (with build.xml like <project default="test"><target name="test"/></project>).
  You can create such a build configuration by copying existing (failing) configuration and change build runner step in the copy.

  Please also check that after the build, the directory /opt/TeamCityAgent/temp/buildTmp exists and writable.


Comment actions Permalink

Hello Kirill,

excellent suggestion! The missing temp directory indeed caused the empty build to fail, but it was agentTmp instead of buildTmp. I'll verify it again with our real build and flag your reply as answer if it works.

Thanks for your help!



Please sign in to leave a comment.