Build永远不会在TFS2012上启动

时间:2013-03-13 14:08:51

标签: build tfs build-automation tfs2012

我正在尝试在TFS基础架构中设置一些构建控制器和代理。我们的TFS服务器被设置为构建控制器,我也设置了一些构建代理。

当我在我的系统上排队新版本时,一切似乎都很好。不会显示任何错误消息,并且构建将显示在我的系统上的队列中。然而,这就是所有发生的事情。当我进入Visual Studio中的构建页面时,它表示它已经“运行0秒”。查看我们的TFS服务器上的管理控制台,控制器将其命名为“Ready”,但仅此而已。所有代理商都被列为“就绪”。

我不知道我可以用来诊断这个问题的任何日志。我已将“记录详细程度”设置为“诊断”,但“诊断”下拉列表中的选项显示为灰色。该活动也是完全空白的。

查看构建控制器上的数据库,dbo.tbl_BuildController表会列出构建。但我发现奇怪的是,StartTime是NULL。如果我在VS中停止构建,则在数据库中将开始时间和结束时间设置为相同的内容。

所以,我知道构建正在使用构建控制器注册,并且没有通信问题;构建永远不会开始,永远不会出错。我该如何解决这个问题? (或者,至少得到一个我可以追逐的错误)。

编辑:该问题似乎与TFS服务器有关。这是我在事件日志中发现的内容:

WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/10411892
 Exception: System.ServiceModel.ServiceActivationException: The service '/tfs/queue/GPA/Services/v4.0/MessageQueueService2.svc' cannot be activated due to an exception during compilation.  The exception message is: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.
Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'.
Parameter name: item
   at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item)
   at System.Collections.Generic.SynchronizedCollection1.Add(T item)
   at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses)
   at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
   at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
   at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
 Process Name: w3wp
 Process ID: 3756

4 个答案:

答案 0 :(得分:3)

我会开始查看事件日志。

  1. 控制面板 - >管理工具
  2. 事件查看器
  3. 我假设那里会出现某种排序或错误。如果构建代理程序位于不同的计算机上,请确保同时查看事件日志。

    从原始海报评论更新

    事件日志中有一个例外,它指出了我们:TFS2012 Build Service offline

答案 1 :(得分:3)

去检查用于security的用户的build service properties设置。我遇到了几乎相同的问题,因为我为那个突然无法构建的特定用户更改了一些安全设置。

找到用户:

  1. 转到您的TFS服务器
  2. 打开Team Foundation Server管理控制台
  3. 打开构建配置
  4. 打开构建服务的属性

答案 2 :(得分:0)

构建控制器和代理必须运行相同版本的Team Foundation Build。 (Buid Service版本类似于v4.0或v4.1,它与tfs产品版本不同,有点像11.0.50727.1)

因此,如果构建代理和控制器部署在不同的计算机上,请检查两台计算机上的构建服务版本。它必须是一样的。

TFS阻止将构建代理分配给具有不同构建服务版本的构建控制器。但是,您可以将其中一个构建计算机升级到其他版本(例如visual studio update 2),而无需分离控制器和代理程序 在某些情况下,构建服务版本保持不变(例如,尽管升级到更新2,版本保持v4.0)

在这种情况下,如果要应用新版本的构建服务

在tfs 2012或2013中检查构建服务版本:

  1. 转到Build Machine
  2. 打开Team Foundation Server管理控制台
  3. 打开构建配置
  4. 打开构建服务属性(单击取消注册旁边的属性链接 链路)
  5. “在”文本框“上侦听构建代理通信
  6. 应用更改构建服务版本

    1. 停止服务
    2. 点击“更改”按钮
    3. 设置不同的端口号
    4. 重置以前的端口号
    5. 构建服务版本将立即从v4.0更改为v4.1

      你的

答案 3 :(得分:0)

这对我有用,用于访问托管在不同服务器上的TFS的用户帐户的密码已过期。

密码重置已成功解决此问题。