0
votes

I'm setting up TFS 2015 for my team to try out, and I'm having trouble getting it off the ground. It sounded straightforward, but things don't work and I can't find any diagnostics, and tutorials don't match what I'm seeing. Some highlights:

  • When I go to download a Build Agent from the server, I don't get a PowerShell file (ConfigureAgent.ps1), I get ConfigureAgent.cmd.
  • The images and description of setting up the build controller show me a nice picture of the TFS Admin Console with a Build Controller and Build Agent and their statuses underneath 'Build' (see Team Foundation Server 2015 Builds will not start or https://msdn.microsoft.com/en-us/library/ms181712.aspx.) On my system, I see this display under XAML Build Config (the old way,) but the Build item in the console doesn't have anything like that. It has a link to download an agent, but installing an agent doesn't change this.
  • Installing the agent appears to work. I get a service that's running, and the web portal agrees that I have an agent in the default queue and pool.
  • But, queuing a build just sits there. I've found the _diag folder for the agent, which has logs with a bunch of "Message received, no message retrieved" lines. I can't find anywhere else to check if the server knows about this build.
  • The service account is Network Service, and I've tried putting it in every TFS group mentioned online regarding permissions.

My setup is TFS and VS 2015 installed on our build machine, with it also hosting the build agent. I'm on port 8079, because port 8080 is taken. It's got to be something silly I missed, because everything looks like it's working. Has anyone gotten this beast off the ground without coming from a pre-existing install?

3
Your second bullet is because you're looking at the XAML build system in those screenshots. TFS 2015 has two build systems, the XAML system is older and less robust. The newer build system has no build controller, just agents. - Daniel Mann
That's what I thought, it's just frustrating that those are the screenshots. You can see on some of them they're under "Build" not "XAML Build," so clearly not from 2015 - John Neuhaus

3 Answers

4
votes
  1. The configureagent.cmd is the correct file (it does pretty much what he ps script did)
    1. Make sure the account that the agent is run under is in the "Agent Pool Service Account" role. It is better to use a domain/machine account not a local service account.
    2. Make sure the queue is provisioned in the collection ( https://your-tfs-server:8080/tfs/your-collection/_admin/_AgentQueue ). If not - select "New queue.." and select the existing queue.
    3. Make sure that when setting up the build through web access, the demands (on the general tab) is met by the capabilities of the agent.

If all this is in place, I have found that it facilitates testing by running the agent in interactive mode (not as a service). This gives you a bit better insight into what is happening. When it is working you can configure it as a service again.

1
votes

Use an actual service account, not NETWORK SERVICE, and make sure that service account is a member of the Build Service Accounts group in your Team Project.

0
votes

For me the issue was that the IIS's Team Foundation Server site setting's Authentication, "Windows Authentication" had to be enabled.

I was using a windows user as the log in credentials for the Build Agent running as a service.

Remember this new build system uses all http now. It does not talk to any tfs build controller.