1
votes

I am using TFS build server 2015 and I'm trying to run a build but the build always stuck on
waiting for an available agent for 2-3 minutes and then fails.
I tried to download the log.zip but its empty.

waiting for an available agent

When I run the agent from cmd the next message appears:

The Agent failed to start this job. Error: An error occurred while sending the request

I checked all the logs in the event viewer and there are no errors at all.
I also tried to re-install the agent and nothing seems to help.

My configuration process: enter image description here

Edit: I found the problem. in the Team Foundation Administration Console the property of "Notification URL" was with invalid value of not existed server.

3

3 Answers

1
votes

If your build requires a specific capability, then the agent must have those.

When a build is queued, the system sends the job only to agents that have the capabilities demanded by the build definition.

Check the build definition requirements and the agent offering: it is clearly described in the Demands section of documentation.

1
votes
  1. Make sure the account that the agent is run under is in the "Agent Pool Service Account" role.

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

Adding a screenshot:

enter image description here

1
votes

I found the problem. in the Team Foundation Administration Console the property of "Notification URL" was with invalid value of not existed server.