2015-04-18 49 views
3

我使用Chef插件在Azure中設置了一個新的Win2012虛擬機,並將其連接到manage.chef.io。增加了一本使用WebPi食譜來安裝ServiceBus及其依賴項的食譜。安裝失敗,出現以下錯誤:廚師WebPI菜譜無法安裝在Azure中

「Error opening installation log file. Verify that the specified log file location exists and is writable.」 

經過一番搜索,它看起來像這不是在此基礎上2013的博客文章,Azure的新 - https://nemetht.wordpress.com/2013/02/27/web-platform-installer-in-windows-azure-startup-tasks/

它提供了一個劈禁用安全的文件夾上暫時但我正在尋找更好的解決方案。

任何想法?

更多的日誌輸出 - (!感謝布萊恩)

Started installing: 'Microsoft Windows Fabric V1 RTM' 

. 

Install completed (Failure): 'Microsoft Windows Fabric V1 RTM' 

. 

WindowsFabric_1_0_960_0 : Failed. 
Error opening installation log file. Verify that the specified log file location exists and is writable. 


DependencyFailed: Microsoft Windows Fabric V1 CU1 


DependencyFailed: Windows Azure Pack: Service Bus 1.1 

. 
.. 




Verifying successful installation... 


Microsoft Visual C++ 2012 SP1 Redistributable Package (x64) True 


Microsoft Windows Fabric V1 RTM     False 


    Log Location: C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\Web Platform Installer\logs\install\2015-05-11T14.15.51\WindowsFabric.txt 


Microsoft Windows Fabric V1 CU1     False 


Windows Azure Pack: Service Bus 1.1    False 


Install of Products: FAILURE 
STDERR: 
---- End output of "WebpiCmd.exe" /Install /products:ServiceBus_1_1 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log ---- 
Ran "WebpiCmd.exe" /Install /products:ServiceBus_1_1 /suppressreboot /accepteula /Log:c:/chef/cache/WebPI.log returned -1 
+0

我可以獲得廚師客戶端運行的完整輸出嗎? (另外,如果chef-client在info或debug模式下運行,可以通過chef-client -l switch或通過設置client.rb中的log_level來運行) –

+0

在原始問題中添加了更多日誌。在進一步測試中,我還注意到,如果我登錄到VM並手動運行chef-client,則安裝將正常工作。我假設它是作爲我(管理員帳戶)而不是系統帳戶運行的,並且我有權訪問日誌文件夾/文件。 – chief7

+0

嗨,我看了一下(https://github.com/opscode-cookbooks/webpi)食譜,我需要一些額外的疑難解答信息。您能否提供以下內容:(*)發佈節點的完整run_list,(*)您正在運行的配方的上下文,(*)您用來設置webpi的烹飪書的鏈接。另外,你如何運行廚師客戶端 - 通過測試廚房,或通過定時器,流浪者或其他方式的廚師客戶食譜?最後,你可以發佈chef-client run的完整輸出,並且包含失敗的Stacktrace。 –

回答

4

廚師的接觸幫助我理解這個問題更好。某些WebPI軟件包不尊重提供給WebPIcmd.exe的顯式日誌路徑。作者應該修復該包以在設置時使用提供的日誌路徑。所以選項變成了:

  • 紛紛撰文修復包
  • 運行廚師在一個新的計劃任務爲不同的用戶,其具有AppData文件夾
  • 編輯食譜訪問 執行/ unperform一個註冊表編輯將AppData文件夾臨時移動到系統 用戶有權訪問的位置。無論是在我的自定義食譜或分叉WebPI 食譜。

顯然,等待作者(在這種情況下,微軟)修復軟件包不會很快發生。

更改Azure虛擬機的運行方式考慮到整體思路是在配置時提供配置並且它正常工作,Chef沒有任何意義。另外,更改默認設置可能會產生意想不到的後果,並將我們置於非標準環境中。

在短期內,我決定在我的自定義食譜中更改註冊表。

registry_key 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' do 
    values [{ 
     :name => "Local AppData", 
     :type => :expand_string, 
     :data => "%~dp0appdata" 
     }] 
     action :create 
end 
webpi_product 'ServiceBus_1_1' do 
    accept_eula true 
    action :install 
end 
webpi_product 'ServiceBus_1_1_CU1' do 
    accept_eula true 
    action :install 
end 
registry_key 'HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' do 
    values [{ 
     :name => "Local AppData", 
     :type => :expand_string, 
     :data => '%%USERPROFILE%%\AppData\Local' 
     }] 
end 

這個改變也可以在WebPI食譜中完成,也可以解決所有相關食譜中的這個問題。我決定不採取這種行動,直到WebPI團隊響應該框架的功能請求來驗證軟件包是否遵守日誌路徑。

http://forums.iis.net/t/1225061.aspx?WebPI+Feature+Request+Validate+product+package+log+path+usage

請去回覆此線程試圖讓球隊以幫助抵禦這個共同的封裝問題。

+0

謝謝。我遇到了與AWS OpsWork相同的問題。這真的很有幫助。這是一個恥辱被迫實施這樣的黑客,但我們還能做什麼:( –