2013-03-13 88 views
4

我試圖在我們的TFS基礎設施中設置一些構建控制器和代理。我們的TFS服務器被設置爲構建控制器,並且我也設置了一些構建代理。構建永遠不會啓動TFS2012

當我在我的系統上排隊一個新的構建時,一切似乎都很好。沒有錯誤消息出現,並且構建出現在我的系統上的隊列中。然而,這就是所有的事情。當我轉到Visual Studio中的構建頁面時,它表示它已經「運行0秒」。看看我們的TFS服務器上的管理控制檯,控制器表明它是「準備好」,但沒有更多。所有代理商都被列爲「準備就緒」。

我不知道有任何日誌可以用來診斷此問題。我已將Logging Verbosity設置爲「診斷」,但診斷下拉列表中的選項顯示爲灰色。該活動也完全空白。

查看構建控制器上的數據庫,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 

回答

3

我會開始查看事件日誌。

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

我假設會有某種或錯誤出現在那裏。如果您的構建代理位於不同的計算機上,請確保您在那裏查看事件日誌。從原來的海報

更新評論

有沒有在事件日誌中,其指出我們在這裏一個例外:TFS2012 Build Service offline

+0

有的確在TFS服務器上出現錯誤。 「服務'/tfs/queue/GPA/Services/v4.0/MessageQueueService2.svc'由於在編譯過程中出現異常而無法激活,異常消息是:這個集合已經包含一個地址和http,它可以在這個集合中的每個方案最多有一個地址。「 – Andrew 2013-03-13 14:25:57

+0

請參閱:http://stackoverflow.com/questions/15378001/tfs2012-build-service-offline/15378482#15378482 – gregpakes 2013-03-13 14:33:51

+1

而不是允許多個綁定,我已經刪除了以前添加的不正確的綁定。此問題似乎已解決。非常感謝你! – Andrew 2013-03-13 14:37:27

3

去檢查用於build service properties用戶的security設置。我有幾乎相同的問題,這是因爲我改變了一些特定用戶的安全設置,他突然無法再建立。

要找到用戶:

  1. 轉到您的TFS服務器
  2. 開放的Team Foundation Server管理控制檯
  3. 打開構建配置
  4. 編譯服務的
  5. 打開屬性
+1

我有一個類似的問題,但我的生成服務被設置爲使用錯誤的項目集合 – 2015-01-02 18:33:48

+0

我希望我早點看到這個答案!謝謝! – Shiv 2017-08-22 00:57:52

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. 去蓋機
  2. Open Team Foundati服務器管理控制檯
  3. 打開構建配置
  4. 開放編譯服務屬性(點擊屬性鏈接旁邊註銷 鏈接)
  5. 「傾聽生成代理通信的」文本框

到應用的構建服務版本

  1. 變化停止服務
  2. 點擊「C焊割」按鈕
  3. 設置不同的端口號
  4. 重置以前的端口號
立即

構建服務版本將會從V4.0更改爲V4.1

+0

今天我又陷入了同樣的問題。最後它由TFS服務器上的iisreset解決 – 2014-06-25 09:01:47