Build Error: Failed to perform checkout on agent: Unable to delete conflicting workspace

Answered

Both of my build agents are throwing this root error for all the applications it has:

"Failed to perform checkout on agent: Unable to delete conflicting workspace TeamCity-A6-bb83b3ab10c443e7a33c0a285d688cd9;edad1ed6-183e-4bb2-a41e-8b82fc3fa26f\alex. Please delete it manually"

Each time we try and run the build the same errors are thrown around the same time from when it started and the paths are different each time. I'm not very familiar with TeamCity as I have inherited this project from the lead dev who has since resigned and I'm stuck trying to figure out what I need to do to resolve this situation. Forgive my ignorance as I have virtually zero experience troubleshooting this.

So far I've tried:

- Looking at the TeamCity directory to see if these paths exist, haven't found any.
- Start a new build in hopes it clears up, still fails.

Any help to get me started is much appreciated. Thank you.

0
5 comments
Avatar
Fedor Rumyantsev

Hello Jason,

The issue looks like build configurations (https://www.jetbrains.com/help/teamcity/build-configuration.html) which are started on build agents are trying to checkout TFS-based VCS root (https://www.jetbrains.com/help/teamcity/vcs-root.html) but fail in process. I also understand that the issue occurs when the build is started.

Could you please:
1) collect <build agent folder>/logs/teamcity-agent.log and teamcity-vcs.log files from any of the mentioned agents, and also <TeamCity server>/logs/teamcity-vcs.log from the server installation
2) send them over via Submit a request form at the top of the page?

Please also make a link to this thread in a request so it will be routed to me. 
For any questions or concerns, please let me know.

0

In case it helps someone else in future, i encountered this error when i accidentally had two copies of the same VCS root in a build configuration, inherited via different paths. The error message "please delete workspace manually" suggests the problem is on the agent itself, but actually it was much simpler than that, in the VCS configuration.

1

Hello Ben,

Thank you for reaching out, this is appreciated!

0

I'm having this issue as well:

Failed to perform checkout on agent: Unable to delete conflicting workspace TeamCity-A8-de385f29786b4398af218693fc710b29;014ce369-8248-4498-a01e-8c9a96dcd3c3. Please delete it manually

I have deleted it manually on the build server using this script:

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat"
tf workspace /collection:https://tfs.company.x/DefaultCollection /delete TeamCity--A8-de385f29786b4398af218693fc710b29;014ce369-8248-4498-a01e-8c9a96dcd3c3

The workspace is deleted, can be confirmed by running 
tf workspaces /collection:https://tfs.company.x/DefaultCollection

However, each new build attempt in TeamCity still results in the same Unable to delete conflicting workspace error.
Also after restarting TeamCity and all agents.
How do I clear the old workspace from TeamCity's cahce?

0

Fixed it by removing the cache in
…\Agent.1\system\tfs\tee\Cache\VersionControl.config
just removed the whole <WorkspaceInfo> tag. Now it builds again.

0

Please sign in to leave a comment.