RunBuildException when running build stage CreateCheckoutDirectoryStage: Failed to create build checkout directory at

Hi,

suddenly I have started to getting an expection RunBuildException when running build stage CreateCheckoutDirectoryStage: Failed to create build checkout directory at <path to SVN checkout>

now almost every build I am getting an error.

The check out folder seems to be locked by a TeamCity, when I manually remove it, everything works fine.

Regards,
Szymon

3 comments

Hello,

I have similar problem. I'm really interested in some stable permanent for this issue.

0

Hi Damian

Could you please post teamcity-agent.log.

Thanks

0

I have this problem when I ask for a clean folder rebuilding. Now I workaround the problem by manually creating the folder.

I attach the teamcity-agent.log. This is the part that is written after I launch the build:

[2012-08-10 09:55:15,097]   INFO - mpl$TeamCitySpringSubConatiner - Refreshing SubContext: running build context id=79: startup date [Fri Aug 10 09:55:15 CEST 2012]; parent: jetbrains.buildServer.agent.AgentMain2$1@18f1d7e
[2012-08-10 09:55:16,894]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.LogAgentParametersStage
[2012-08-10 09:55:16,925]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.ClearExpiredBuildWorkingDirectoriesStage
[2012-08-10 09:55:16,925]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.UpdateDirectoryMapStage
[2012-08-10 09:55:17,003]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.RegisterPropertiesFileNamesStage
[2012-08-10 09:55:17,065]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.FireBuildStartedStage
[2012-08-10 09:55:17,112]   INFO - gentLoggerReplacerConfigurator - Passwords replacement in logs enabled
[2012-08-10 09:55:18,331]   INFO - uildServer.swabra.SwabraLogger - Swabra cleanup is disabled
[2012-08-10 09:55:18,347]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.EnableBuildStopStage
[2012-08-10 09:55:18,347]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanAgentTempDirectoryStage
[2012-08-10 09:55:18,347]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateAgentTempDirectoryStage
[2012-08-10 09:55:18,347]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.PublishBuildPropertiesStage
[2012-08-10 09:55:18,409]   INFO - ernalArtifactsProcessingLogger - Publishing artifacts process started
[2012-08-10 09:55:18,409]   INFO - ernalArtifactsProcessingLogger - Start: Searching for artifacts to publish
[2012-08-10 09:55:18,409]   INFO - ernalArtifactsProcessingLogger - Done:  Searching for artifacts to publish
[2012-08-10 09:55:18,409]   INFO - ernalArtifactsProcessingLogger - Start: Pre-processing artifacts if needed (archiving)
[2012-08-10 09:55:18,409]   INFO - ernalArtifactsProcessingLogger - Done: Pre-processing artifacts if needed (archiving)
[2012-08-10 09:55:18,409]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanBuildTempDirectoryStage
[2012-08-10 09:55:18,440]   INFO - s.CleanBuildTempDirectoryStage - Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[2012-08-10 09:55:18,847]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\temp\buildTmp to C:\TeamCity\buildAgent\temp\.old\buildTmp_0 for cleaning
[2012-08-10 09:55:18,847]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateBuildTempDirectoryStage
[2012-08-10 09:55:18,847]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.DirtySourcesIfCleanBuildStage
[2012-08-10 09:55:18,847]   INFO -    jetbrains.buildServer.AGENT - Patch downloaded for build 79
[2012-08-10 09:55:18,909]   INFO - ernalArtifactsProcessingLogger - Start: Sending files
[2012-08-10 09:55:19,144]   INFO - ernalArtifactsProcessingLogger - Done publishing artifacts to .teamcity/properties, total files published: 1
[2012-08-10 09:55:19,144]   INFO - ernalArtifactsProcessingLogger - Done: Sending files
[2012-08-10 09:55:19,175]   INFO - ernalArtifactsProcessingLogger - Publishing artifacts process finished
[2012-08-10 09:55:19,378]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanBuildCheckoutDirectoryIfNeededStage
[2012-08-10 09:55:19,378]   INFO - CheckoutDirectoryIfNeededStage - Clean build enabled: removing old files from C:\TeamCity\buildAgent\work\c034d78bc25fd6f6
[2012-08-10 09:55:19,628]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\.nuget to C:\TeamCity\buildAgent\work\.old\.nuget_0 for cleaning
[2012-08-10 09:55:19,675]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Assemblies to C:\TeamCity\buildAgent\work\.old\Assemblies_0 for cleaning
[2012-08-10 09:55:19,706]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\packages to C:\TeamCity\buildAgent\work\.old\packages_0 for cleaning
[2012-08-10 09:55:19,784]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\AI Search to C:\TeamCity\buildAgent\work\.old\AI Search_0 for cleaning
[2012-08-10 09:55:19,816]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Basic types extensions to C:\TeamCity\buildAgent\work\.old\Basic types extensions_0 for cleaning
[2012-08-10 09:55:19,894]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\bin to C:\TeamCity\buildAgent\work\.old\bin_0 for cleaning
[2012-08-10 09:55:19,956]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Collections to C:\TeamCity\buildAgent\work\.old\Collections_0 for cleaning
[2012-08-10 09:55:19,972]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Collections extensions to C:\TeamCity\buildAgent\work\.old\Collections extensions_0 for cleaning
[2012-08-10 09:55:20,003]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\CommandLine to C:\TeamCity\buildAgent\work\.old\CommandLine_0 for cleaning
[2012-08-10 09:55:20,019]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Compilation to C:\TeamCity\buildAgent\work\.old\Compilation_0 for cleaning
[2012-08-10 09:55:20,050]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Configuration to C:\TeamCity\buildAgent\work\.old\Configuration_0 for cleaning
[2012-08-10 09:55:20,066]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Copyable to C:\TeamCity\buildAgent\work\.old\Copyable_0 for cleaning
[2012-08-10 09:55:20,097]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\EventArgs to C:\TeamCity\buildAgent\work\.old\EventArgs_0 for cleaning
[2012-08-10 09:55:20,128]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Functions to C:\TeamCity\buildAgent\work\.old\Functions_0 for cleaning
[2012-08-10 09:55:20,175]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\IO to C:\TeamCity\buildAgent\work\.old\IO_0 for cleaning
[2012-08-10 09:55:20,206]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Math to C:\TeamCity\buildAgent\work\.old\Math_0 for cleaning
[2012-08-10 09:55:20,237]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\My Project to C:\TeamCity\buildAgent\work\.old\My Project_0 for cleaning
[2012-08-10 09:55:20,253]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Ninject to C:\TeamCity\buildAgent\work\.old\Ninject_0 for cleaning
[2012-08-10 09:55:20,284]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Nullable2 to C:\TeamCity\buildAgent\work\.old\Nullable2_0 for cleaning
[2012-08-10 09:55:20,316]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\obj to C:\TeamCity\buildAgent\work\.old\obj_0 for cleaning
[2012-08-10 09:55:20,362]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Reflection to C:\TeamCity\buildAgent\work\.old\Reflection_0 for cleaning
[2012-08-10 09:55:20,394]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Search and Replace to C:\TeamCity\buildAgent\work\.old\Search and Replace_0 for cleaning
[2012-08-10 09:55:20,425]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\StepBackgroundWorker to C:\TeamCity\buildAgent\work\.old\StepBackgroundWorker_0 for cleaning
[2012-08-10 09:55:20,441]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Text to C:\TeamCity\buildAgent\work\.old\Text_0 for cleaning
[2012-08-10 09:55:20,472]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Tree to C:\TeamCity\buildAgent\work\.old\Tree_0 for cleaning
[2012-08-10 09:55:20,503]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes\Tuples to C:\TeamCity\buildAgent\work\.old\Tuples_0 for cleaning
[2012-08-10 09:55:20,534]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.ConsoleMvc to C:\TeamCity\buildAgent\work\.old\Proes.ConsoleMvc_0 for cleaning
[2012-08-10 09:55:20,566]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Data to C:\TeamCity\buildAgent\work\.old\Proes.Data_0 for cleaning
[2012-08-10 09:55:20,581]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Data.Objects to C:\TeamCity\buildAgent\work\.old\Proes.Data.Objects_0 for cleaning
[2012-08-10 09:55:20,612]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Drawing to C:\TeamCity\buildAgent\work\.old\Proes.Drawing_0 for cleaning
[2012-08-10 09:55:20,644]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Excel to C:\TeamCity\buildAgent\work\.old\Proes.Excel_0 for cleaning
[2012-08-10 09:55:20,722]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Geometry to C:\TeamCity\buildAgent\work\.old\Proes.Geometry_0 for cleaning
[2012-08-10 09:55:20,800]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.MicrosoftExcel to C:\TeamCity\buildAgent\work\.old\Proes.MicrosoftExcel_0 for cleaning
[2012-08-10 09:55:21,034]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\bin to C:\TeamCity\buildAgent\work\.old\bin_1 for cleaning
[2012-08-10 09:55:21,066]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\My Project to C:\TeamCity\buildAgent\work\.old\My Project_1 for cleaning
[2012-08-10 09:55:21,097]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\obj to C:\TeamCity\buildAgent\work\.old\obj_1 for cleaning
[2012-08-10 09:55:21,159]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes to C:\TeamCity\buildAgent\work\.old\Proes_1 for cleaning
[2012-08-10 09:55:21,191]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes.Data to C:\TeamCity\buildAgent\work\.old\Proes.Data_1 for cleaning
[2012-08-10 09:55:21,222]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes.Drawing to C:\TeamCity\buildAgent\work\.old\Proes.Drawing_1 for cleaning
[2012-08-10 09:55:21,253]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes.Excel to C:\TeamCity\buildAgent\work\.old\Proes.Excel_1 for cleaning
[2012-08-10 09:55:21,284]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes.Geometry to C:\TeamCity\buildAgent\work\.old\Proes.Geometry_1 for cleaning
[2012-08-10 09:55:21,300]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Test\Proes.MicrosoftExcel to C:\TeamCity\buildAgent\work\.old\Proes.MicrosoftExcel_1 for cleaning
[2012-08-10 09:55:21,362]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Web to C:\TeamCity\buildAgent\work\.old\Proes.Web_1 for cleaning
[2012-08-10 09:55:21,378]   INFO - rectories.DirectoryCleanerImpl - Move directory C:\TeamCity\buildAgent\work\c034d78bc25fd6f6\Proes.Windows to C:\TeamCity\buildAgent\work\.old\Proes.Windows_1 for cleaning
[2012-08-10 09:55:21,378]   INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateCheckoutDirectoryStage
[2012-08-10 09:55:21,394]   WARN - nt.impl.BuildExceptionsHandler - Failed to execute build stage: CreateCheckoutDirectoryStage. Agent failed to create build checkout directory at C:\TeamCity\buildAgent\work\c034d78bc25fd6f6. Please check agent has necessary permissions and there is enough free space on disk.
jetbrains.buildServer.agent.impl.buildStages.BuildStageExecutionException: Agent failed to create build checkout directory at C:\TeamCity\buildAgent\work\c034d78bc25fd6f6. Please check agent has necessary permissions and there is enough free space on disk.
 at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:33)
 at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
 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:70)
 at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50)
 at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:242)
 at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:47)
 at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:215)
 at java.lang.Thread.run(Unknown Source)
Caused by: jetbrains.buildServer.RunBuildException: Agent failed to create build checkout directory at C:\TeamCity\buildAgent\work\c034d78bc25fd6f6. Please check agent has necessary permissions and there is enough free space on disk.
 at jetbrains.buildServer.agent.impl.buildStages.startStages.CreateDirectoryStageBase.doBuildStage(CreateDirectoryStageBase.java:24)
 at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
 ... 10 more
[2012-08-10 09:55:21,519]   INFO - gentLoggerReplacerConfigurator - Passwords replacement in logs disabled
[2012-08-10 09:55:21,519]   INFO - ernalArtifactsProcessingLogger - Publishing artifacts process started
[2012-08-10 09:55:21,519]   INFO - ernalArtifactsProcessingLogger - Start: Searching for artifacts to publish
[2012-08-10 09:55:21,519]   INFO - ernalArtifactsProcessingLogger - Done:  Searching for artifacts to publish
[2012-08-10 09:55:21,519]   INFO - ernalArtifactsProcessingLogger - Start: Pre-processing artifacts if needed (archiving)
[2012-08-10 09:55:21,519]   INFO - ernalArtifactsProcessingLogger - Done: Pre-processing artifacts if needed (archiving)
[2012-08-10 09:55:21,566]   INFO - ernalArtifactsProcessingLogger - Start: Sending files
[2012-08-10 09:55:21,597]   INFO - ernalArtifactsProcessingLogger - Done publishing artifacts to .teamcity/properties, total files published: 1
[2012-08-10 09:55:21,597]   INFO - ernalArtifactsProcessingLogger - Done: Sending files
[2012-08-10 09:55:21,628]   INFO - ernalArtifactsProcessingLogger - Publishing artifacts process finished
[2012-08-10 09:55:21,644]   INFO -    jetbrains.buildServer.AGENT - Build finished: 79
[2012-08-10 09:55:21,659]   INFO - nt.impl.BuildRunAgentStateImpl - Disposing build context
[2012-08-10 09:55:21,659]   INFO - mpl$TeamCitySpringSubConatiner - Closing SubContext: running build context id=79: startup date [Fri Aug 10 09:55:15 CEST 2012]; parent: jetbrains.buildServer.agent.AgentMain2$1@18f1d7e
[2012-08-10 09:55:21,675]   INFO - ctories.CleanupRegistryCleaner - Start deleting files from C:\TeamCity\buildAgent\temp\.old
[2012-08-10 09:55:22,050]   INFO - ctories.CleanupRegistryCleaner - Stop deleting files from C:\TeamCity\buildAgent\temp\.old. 7 file(s) were deleted.  
[2012-08-10 09:55:22,050]   INFO - ctories.CleanupRegistryCleaner - Start deleting files from C:\TeamCity\buildAgent\work\.old
[2012-08-10 09:55:34,582]   INFO - ctories.CleanupRegistryCleaner - Stop deleting files from C:\TeamCity\buildAgent\work\.old. 968 file(s) were deleted.  



Attachment(s):
teamcity-agent.log.zip
0

Please sign in to leave a comment.