WimH
WimH

Reputation: 1

TFS 15 RC1 - Build agent not running/working - no agent pool found with identifier

We currently have upgraded our Team Foundation Server 2015 to Team foundation server 15, RC1. But i cannot get our existing or new build agents running. The error we got is always the same. No agent pool found with identifier 1 (or 2, ....).

I have checked the database and there is an agent pool with that ID.

Any idea anyone?

thanks.

Upvotes: 0

Views: 5186

Answers (3)

tgolisch
tgolisch

Reputation: 6744

I had the exact same thing: an existing build server, which was working until somebody upgraded it. Error message in the .\BuildAgent_Diag\ folder kept saying

Failed to create session. Sleeping for 10 seconds before next retry
----------------------------------------
Microsoft.TeamFoundation.DistributedTask.WebApi.TaskAgentPoolNotFoundException: No agent pool found with identifier 7.

I already had the service running as a domain account with "build admin" permissions.

The solution was to run 'ConfigureAgent' again: Open a command prompt as administrator. Change directory to your 'BuildAgent' folder (or where ever your 'ConfigureAgent.cmd' file is located) and run 'ConfigureAgent.cmd'. It will ask a few questions. I stayed with the current settings. I had to enter the password for the service account. Eventually the wizard completed and everything worked again.

Upvotes: 0

WimH
WimH

Reputation: 1

Thanks for your time, however the issue is solved with Microsoft support. It turned out that my default access level was stakeholder, while build permissions are in the basic. So i had to change the default access level to Basic. That's obvious a bug in the new RC1, but like you said, it was some kind of a permission issue.

thanks again.

Upvotes: 0

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51073

If the build agent pool definitely exists, but the error is can't find the agent pool. Then the issue is very likely related to permissions.

When configuring the build agent(new created or existed), you need to make sure the account which running the configure command or script have enough permission.

The user account needs to be part of the Agent Pool Administrator Accounts.


Update

Try below ways to narrow down the issue:

  1. First check in that if the build server is available and enabled in TFS at https://YOURCOMPANYNAME:8080/tfs/_admin/_AgentQueue, and
    your build agent should be “Green”.
  2. Make sure the agent is in interactive mode.
  3. Try to change a domain account which is a member of the Build Agent Service Accounts group and belongs to "Agent Pool Service Account" role, to see whether the agent would work or not.
  4. Double check whether there are some Firewall interface block the
    build, try to disable all related settings.

Update 2

Browse the Control Panel - Team Project Collection - Team Project- Agent queues- click agent pool - Roles- click Add... - Add your user ID and select Administrator in Role

After this try again.

enter image description here

Upvotes: 1

Related Questions