0
votes

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."

  • The user that the build agent service is running as has access to the TFS repository.
  • As far as I know, there is no proxy between the build agent and the server.
  • The server is within the same network as the build agent; it is not Team Services.
  • The agent version is 1.83.2

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.
1
Does your organization use any proxies?Daniel Mann
Not that I know of between the build agent and the TFS server. The server is on-premises, not Team Services. I'll add that to the question.Richard Ward
Try to setup a new build agent and try again to check whether the issue persist.starian chen-MSFT

1 Answers

1
votes

You could try below ways to narrow down the issue:

  • Please check your TFS version, the agent version 1.83.2 is for TFS 2015 RTM. if your TFS is not 2015 RTM , suggest you update the agent to the specific version.
  • Check the event viewer on the TFS server if there are some related error info.
  • 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.

  • If you are using Window Server 2008R2, just try to apply the HotFix and try the workaround.