4

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

当我在我的系统上排队一个新的构建时,一切似乎都很好。没有出现错误消息,并且构建出现在我系统的队列中。然而,这就是所有发生的事情。当我转到 Visual Studio 中的构建页面时,它表明它一直在“运行 0 秒”。查看我们 TFS 服务器上的管理控制台,控制器声明它“就绪”,但仅此而已。所有代理都被类似地列为“就绪”。

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

查看构建控制器上的数据库,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

4 回答 4

3

我会开始查看事件日志。

  1. 控制面板 -> 管理工具
  2. 事件查看器

我假设那里会出现某种类型或错误。如果您的构建代理在不同的机器上,请确保您也查看那里的事件日志。

从原始海报评论更新

事件日志中有一个异常指向我们:TFS2012 Build Service offline

于 2013-03-13T14:17:42.073 回答
3

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

要查找用户:

  1. 转到您的 TFS 服务器
  2. 打开 Team Foundation Server 管理控制台
  3. 打开构建配置
  4. 构建服务的打开属性
于 2013-03-13T14:22:59.573 回答
0

生成控制器和代理必须运行相同版本的 Team Foundation Build。(Buid Service 版本类似于 v4.0 或 v4.1,它不同于 tfs 产品版本,例如 11.0.50727.1)

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

TFS 阻止将构建代理分配给具有不同构建服务版本的构建控制器。但是,您可以在不分离控制器和代理的情况下将其中一台构建机器升级到不同的版本(例如 Visual Studio 更新 2),在某些情况下构建服务版本保持不变(例如尽管升级到更新 2 版本留在 v4.0)

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

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

  1. 去建造机器
  2. 打开 Team Foundation Server 管理控制台
  3. 打开构建配置
  4. 打开构建服务属性(单击注销链接旁边的属性链接)
  5. “侦听构建代理通信”文本框

应用构建服务版本的更改

  1. 停止服务
  2. 单击“更改”按钮
  3. 设置不同的端口号
  4. 重置之前的端口号

构建服务版本将从 v4.0 立即更改为 v4.1

于 2014-02-20T12:06:28.850 回答
0

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

密码重置为我修复了它。

于 2018-05-15T14:27:37.430 回答