我正在尝试在我们的 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