TFS:服务主机一次只能在一台机器上处于事件状态。 (类型 BuildServiceHostOwnershipException)
今天我们发现我们的 tfs bc(构建 Controller )和 ba(构建代理)确实有效。
当 bc 和 ba 重新启动时,Windows 事件中将记录以下错误事件。
Exception Message: The build service host [build agent name] is currently owned by [build agent name]. A service host may only be active on one machine at a time. (type BuildServiceHostOwnershipException) Exception Stack Trace: at Microsoft.TeamFoundation.Build.Hosting.BuildMachine.StartOperation.End(IAsyncResult result, HttpRouter& router, TfsMessageQueue& messageQueue, List`1& processHosts, MachineLifecycleActivity& traceActivity) at Microsoft.TeamFoundation.Build.Hosting.BuildMachine.EndStart(IAsyncResult result) at Microsoft.TeamFoundation.Build.Machine.WindowsService.EndStartMachine(IAsyncResult result)
Inner Exception Details:
Exception Message: The build service host [build agent name] is currently owned by [build agent name]. A service host may only be active on one machine at a time. (type SoapException)SoapException Details: Exception Stack Trace:
排队的构建作业将挂起步骤:在代理上运行,最后将失败并出现以下错误:
Exception Message: TF400324: Team Foundation services are not available from the server.Technical information (for administrator): Unable to connect to the remote server (type TeamFoundationServiceUnavailableException)Exception Data Dictionary:AgentExecution = FalseException Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)Inner Exception Details:Exception Message: Unable to connect to the remote server (type WebException)Exception Stack Trace: at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult) at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.CompleteGetRequestStream(IAsyncResult result) at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EndGetRequestStream(IAsyncResult result)Inner Exception Details:Exception Message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [tfs server ip] (type SocketException)Exception Stack Trace: at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
我们已尝试重新注册构建 Controller 和构建代理。但不起作用。
请您参考如下方法:
我们尝试了以下解决方案并且有效:
构建 Controller :
1.从tfs注销
2.注销DNS
3.重启
4.重新注册DNS
5.重新注册到tfs
构建代理:
1.从tfs注销
2.注销DNS
3.重启
4.重新注册DNS
5.重新注册到tfs
然后问题就解决了。
==========添加 8/14/2014=======
最近我们在构建服务器上定期遇到这个问题。
现在我们发现我们应该做的就是等待。大约 1 小时后,一切正常。
不确定根本原因。
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。