gpt4 book ai didi

azure - Chef WebPI 说明书在 Azure 中安装失败

转载 作者:行者123 更新时间:2023-12-01 06:52:24 25 4
gpt4 key购买 nike

我使用 Chef 插件在 Azure 中设置了一个新的 Win2012 VM,并将其连接到 manage.chef.io。添加了一个使用 WebPi 说明书来安装 ServiceBus 及其依赖项的说明书。安装失败并出现以下错误:

“Error opening installation log file. Verify that the specified log file location exists and is writable.”

经过一番搜索后,根据这篇 2013 年博客文章 - https://nemetht.wordpress.com/2013/02/27/web-platform-installer-in-windows-azure-startup-tasks/,这在 Azure 中似乎并不新鲜。

它提供了一种暂时禁用文件夹安全性的方法,但我正在寻找更好的解决方案。

有什么想法吗?

更多日志输出 -

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

最佳答案

一位 Chef 联系人(感谢布莱恩!)帮助我更好地理解了这个问题。某些 WebPI 包不遵循提供给 WebPIcmd.exe 的显式日志路径。作者应该修复包以在设置时使用提供的日志路径。所以选项变成了:

  • 让作者修复软件包
  • 以具有访问权限的其他用户身份在新计划任务中运行 Chef到AppData文件夹
  • 编辑说明书以执行/取消执行注册表编辑,以临时将 AppData 文件夹移动到系统可以访问的位置。用户有权访问。要么在我的自定义 Recipe 中,要么 fork WebPI Recipe 。

显然,等待作者(在本例中为 Microsoft)修复该软件包不会很快发生。

考虑到整个想法是在配置时提供配置并且它可以正常工作,因此更改 Azure VM 运行 Chef 的方式没有意义。另外,更改默认设置可能会产生意想不到的后果,并使我们处于非标准环境中。

短期内,我决定更改自定义 Recipe 中的注册表。

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

请回复此帖子,尝试让团队帮助防范此常见的软件包问题。

关于azure - Chef WebPI 说明书在 Azure 中安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29723429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com