Subversion checkout fails on TeamCity 3.1.2 after first build

Hello,

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: java.io.IOException: No such file or directory
jetbrains.buildServer.vcs.VcsException: java.io.IOException: No such file or directory
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:92)
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:1020)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at com.intellij.openapi.util.io.FileUtil.doCreateTempFile(FileUtil.java:274)
at com.intellij.openapi.util.io.FileUtil.createTempFile(FileUtil.java:260)
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:55)
... 4 more
[15:45:54]: Build finished
4 comments
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,
  KIR

0
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:
     trunk=>tags
checking interval 120 sec (global setting)

-checkout rules
none

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

hope this helps,
mikeka



Attachment(s):
Linux-failed.log
0
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.

  Regards,
  KIR

0
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!

regards,
Michael

0

Please sign in to leave a comment.