1

Since we had moved TFS Application Tier to a different server the TFS builds have stopped working. Whenever I try to start a build it fails with the following error:

TF215097: An error occurred while initializing a build for build definition \My\Build: TF214007: No build was found with the URI vstfs:///Build/Build/8320. Either the URI does not exist, or NT AUTHORITY\NETWORK SERVICE does not have permission to access it.

The set up is following:

Server TFSAT contains the TFS Application Tier and a build controller. Server TFSBUILD contains a build agent and a build service running under NT AUTHORITY\NetworkService account. The build agent uses build controller on server TFSAT.

I have already triple-checked that the network service account TFSBUILD$ belongs to the team project collection's group Project Collection Build Service Accounts.

Also I have already tried to open the URL vstfs:///Build/Build/8320 on the server TFSBUILD which results in starting a Visual Studio instance and giving the error: The provided argument vstfs:///Build/Build/8320 must contain a query parameter named url which contains the full qualified URL to the Team Project Collection.

I have also tried to create a fresh new build and run this one - the same issue.

Has anyone got a clue what might be set up wrongly? I could not find any additional permission that should be granted to the build service account (standard network service account in my case).

Please notice that I am quite a newbie when it comes to setting up TFS. Thank you in advance for any hints.

Anton
  • 2,458
  • 2
  • 18
  • 30

1 Answers1

2

First, please make sure you have followed the correct operation in Move Team Foundation Server from one environment to another.

To narrow down the issue you can:

  • Try to restart the build service on the build controller and agent and queue another build.
  • Use another build account not NT AUTHORITY\NETWORK SERVICE and try again.

If you still get the error, try to use below workaround: delete the old build control and agent. Create a new one. Note: you may have to edit all build definitions to point to the new control and agent.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • thank you very much for the response. If I use my domain account instead of the `NT AUTHORITY\NETWORK SERVICE` for both the build agent and build controller, the build works properly. However I am not able to figure out which permissions is the network service missing (I even tried adding the network service to the local Administrators group on both servers and TFS client PC). Do you have an idea? – Anton Aug 11 '16 at 08:42
  • Seriously, it would be just awesome if there was a doc saying. Service account for build service used by build agent has to have access to this, this and this. Service account for build service used by build controller has to have access to this that and this ... – Anton Aug 11 '16 at 08:49
  • Try to deleted the cache files for the Team Build Service Account on the build machine. https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not/ `C:\Documents and Settings\<>\Local Settings\Application Data\Microsoft\Team Foundation\x.0\Cache ` – PatrickLu-MSFT Aug 11 '16 at 08:49
  • According to this http://stackoverflow.com/questions/26313455/the-account-running-the-tfs-build-service-nt-authority-network-service-needs-t .It seems to recommend you to use explicit domain service accounts when you are using a distributed installation. And if you have added the NT AUTHORITY\NetworkService to your local ADMINISTRAOTR group. Seems a reboot to take effect. – PatrickLu-MSFT Aug 11 '16 at 09:03
  • Thank you for the suggestion, I will try and let you know. – Anton Aug 11 '16 at 09:10
  • 1
    Seems like the restart had no effect and based on what is written in the mentioned article about cache reset it seems to be a very radical step, so I ended up creating a separate domain account dedicated to the TFS build service. Thank you very much for your help :). – Anton Aug 11 '16 at 12:12