I am trying to set up build automation (it will be for CI in the future, but at the moment I'm queuing builds manually) on a TFS 2015 server, using the newer method, not the old XAML method. I have a build agent installed and registered (which seems to have gone okay), but every time I try and queue a build, it will fail when syncing the repository with the message "Unable to read data from the transport connection: The connection was closed."
What should I be looking for to fix this? The log is below:
2017-06-28T15:14:02.4032890Z Starting: Get sources
2017-06-28T15:14:02.4188890Z Entering TfvcSourceProvider.PrepareRepositoryAsync
2017-06-28T15:14:02.4188890Z localPath=C:\TFSBuildAgent\WorkFolder\ff694322\SCR
2017-06-28T15:14:02.4188890Z clean=False
2017-06-28T15:14:02.4188890Z sourceVersion=C13590
2017-06-28T15:14:02.4188890Z mappingJson={"mappings":[{"serverPath":"$/SCR","mappingType":"map"},{"serverPath":"$/SCR/Drops","mappingType":"cloak"}]}
2017-06-28T15:14:02.4188890Z Syncing repository: SCR (TFVC)
2017-06-28T15:14:02.4188890Z workspaceName=ws_ff694322_3
2017-06-28T15:14:03.5264910Z Workspace Name: ws_ff694322_3;Build\a2dd1d8a-5146-47c6-bda1-6f761cddeecd
2017-06-28T15:14:13.0113076Z ##[error]Unable to read data from the transport connection: The connection was closed.
2017-06-28T15:14:13.0425077Z ##[error]Unable to read data from the transport connection: The connection was closed.
You could try below ways to narrow down the issue:
Try to set other accounts which can get the sources as the agent service account.
Try to deploy a new agent to check this issue again.