TFS 2017 代理错误(与服务器失去通信)

TFS 2017 agent error (lost communication with the server)

我在 Windows Server 2008 R2 虚拟机上安装了 TFS2017。是的,这是一个奇怪的组合,但它就是这样。

我还在同一个虚拟机上安装了代理(vsts-agent-win7-x64-2.117.2)。代理已作为服务成功安装,已启动 运行,我可以在默认池中看到它(显示为在线,空闲)。

当我请求新版本时问题开始了。它总是因错误而失败:

The agent agent3 lost communication with the server. Verify the machine is running and has a healthy network connection. For more information, see: https://go.microsoft.com/fwlink/?linkid=846610

我还检查了 _diag 文件夹中的日志:

[2018-02-27 09:33:48Z INFO JobDispatcher] Retrying lock renewal for jobrequest 9. Job is still locked for: 10 seconds. [2018-02-27 09:33:58Z ERR JobDispatcher] Catch exception during renew agent jobrequest 9. [2018-02-27 09:33:58Z ERR JobDispatcher] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Not Found at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response) at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.d__48.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__451.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__271.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__261.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Services.Agent.Listener.JobDispatcher.d__12.MoveNext() [2018-02-27 09:33:58Z INFO JobDispatcher] Lock renewal has run out of retry, stop renew lock for jobrequest 9. [2018-02-27 09:33:58Z INFO JobDispatcher] Unable to renew job request for job 88ba8e32-bdca-402c-8a94-d1e39f95819b for the first time, stop dispatching job to worker.

代理似乎出于某种原因无法更新作业队列中的项目。

我检查了防火墙 - 它已关闭,而且 TFS 和代理安装在同一台机器上。

有什么想法吗?

更新。

服务截图:

我尝试在不同的用户下创建不同的代理 运行 - NETWORK 服务或登录到 TFS 的当前用户。我也经常检查服务是否启动。

更新 2.

我试图在同一网络中的另一个虚拟机上安装另一个代理。它已安装并出现在默认池中。但是当它去构建时,会发生同样的错误。顺便说一句,另一个虚拟机在 Windows 服务器 R2 下运行。

哇,

那真是一场噩梦。不过总算是解决了。

问题的根源在于名为 UrlScan 的工具。它安装在服务器上,默认情况下它会阻止除 GET/POST/OPTIONS 之外的所有 http 动词。

启用所有已知动词没有帮助,因为代理似乎使用了一些自定义 http header。唯一的方法是完全卸载 UrlScan。

祝你好运。