TFS 2015 - Waiting for an agent to be requested

2019-07-16 09:27发布

问题:

So after coming back from vacation my build server don't want to run any builds anymore. It's just stuck on Waiting for an available agent / Waiting for an agent to be requested and if I cancel it I feel it get's stuck on Build Cancelling... since nothing more is happening after I cancel the build. The waiting message is still there but the build is not in the build queue though.

All the agents are green in the Agent Pool and the background service is running.

I am getting the following error in the event log:

Detailed Message: There was an error during job agent execution. The operation will be retried. Similar errors in the next five minutes may not be logged.
Exception Message: A previous call to WebApiConfiguration.Initialize failed. See inner exception for details. (type WebApiInitializationPreviouslyFailedException)

And after 14 Inner Exceptions with the same message on the 15th Inner Exception it says:

Exception Message: Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)

I have installed the standalone installer for MVC 4 from http://www.asp.net/mvc/mvc4 but that did not help. Also think it's wierd that it's suddenly missing this assembly. I have also tried reconfiguring the agent.

回答1:

Finnaly got this working again \o/

What I think fixed it was installing the ASP.NET MVC Security Update MS14-059 from this site: https://www.microsoft.com/en-us/download/details.aspx?id=44533

It's still no System.Web.Mvc assembly reference in the %windir%\assembly folder but after innstalling the fix and restarting the server the job agent queued the job right away. And I had restarted the server multiple times before that so it was definitely not because of the restart.