Splunk UniversalForwarder 失败并显示“DeleteContextForAllProducts failed witht: 0x65b”

5 msi splunk sccm windows-server-2008-r2 sccm-2012-r2

我正在尝试使用 MSI 部署类型将 Splunk UniversalForwarder 作为 SCCM 应用程序部署到一小组测试服务器,并且遇到了 MSI 安装程序的异常混乱问题。

部署类型本身非常简单。我将 MSI 文件 (splunkforwarder-6.2.1-245427-x64-release.msi) 上传到 SCCM 站点服务器,并让检测方法从 MSI 自动填充。我所做的唯一一件事就是更改安装字符串以包含以下参数:

msiexec.exe /lv splunkinstall.log /i "splunkforwarder-6.2.1-245427-x64-release.msi" AGREETOLICENSE=YES DEPLOYMENT_SERVER="splunkd.security.contoso.com" /quiet /norestart /qn
Run Code Online (Sandbox Code Playgroud)


由于包含/lv开关,我可以转到 C:\Windows\CCMcache 文件夹并查看安装日志:

GetPreviousSettings:  Error: DetermineContextForAllProducts failed witht: 0x65b.
GetPreviousSettings:  Error 0x80004005: Failed to GetInstalledSplunkSettings.
GetPreviousSettings:  Info: Leave GetPreviousSettings: 0x80004005.
CustomAction GetPreviousSettings returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 14:20:23: GetPreviousSettings. Return value 3.
Run Code Online (Sandbox Code Playgroud)


有点谷歌功能,我在Splunk 的社区支持上找到了这篇文章,但我对答案的正确性不是很有信心;但是安装程序失败的步骤 GetInstalledSplunkSettings这样,也许我应该通过注册表来查看陈旧的产品或安装程序密钥是否错误地导致安装程序尝试卸载不存在的 UniversalForwarder 实例。

通过结合 ProcMon 和手动搜索注册表,我设法找到了以下似乎相关的键。

HKCR:\Installer\Products\B0271F4D65C5D084FA81634DC56AD4A
HKCR:\Installer\Features\B0271F4D65C5D084FA81634DC56AD4AE
HKCR:\Installer\UpgradeCodes\13631B46466632F4FA2E89CF8E9602DB

HKLM:\SOFTWARE\Classes\Installer\Features\B0271F4D65C5D084FA81634DC56AD4AE
HKLM:\SOFTWARE\Classes\Installer\UpgradeCode\13631B46466632F4FA2E89CF8E9602DB
Run Code Online (Sandbox Code Playgroud)


安装过程中的 ProcMon 事件:

10:17:31.8751924 AM MsiExec.exe 7436    RegQueryKey HKLM    SUCCESS Query: HandleTags, HandleTags: 0x0
10:17:31.8752103 AM MsiExec.exe 7436    RegOpenKey  HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Managed\S-1-5-18\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE   NAME NOT FOUND  Desired Access: Read
10:17:31.8752409 AM MsiExec.exe 7436    RegQueryKey HKU SUCCESS Query: HandleTags, HandleTags: 0x0
10:17:31.8752584 AM MsiExec.exe 7436    RegOpenKey  HKU\S-1-5-18\Software\Microsoft\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE REPARSE Desired Access: Read
10:17:31.8752831 AM MsiExec.exe 7436    RegOpenKey  HKU\.DEFAULT\Software\Microsoft\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE NAME NOT FOUND  Desired Access: Read
10:17:31.8753062 AM MsiExec.exe 7436    RegQueryKey HKLM    SUCCESS Query: HandleTags, HandleTags: 0x0
10:17:31.8753230 AM MsiExec.exe 7436    RegOpenKey  HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE    SUCCESS Desired Access: Read
10:17:31.8753486 AM MsiExec.exe 7436    RegQueryValue   HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE\ProductName    SUCCESS Type: REG_SZ, Length: 38, Data: UniversalForwarder
10:17:31.8753716 AM MsiExec.exe 7436    RegCloseKey HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE    SUCCESS 

10:34:31.5741168 AM MsiExec.exe 7560    RegEnumKey  HKCR\Installer\Products SUCCESS Index: 11, Name: B0271F4D65C5D084FA81634DC56AD4AE

10:34:31.5744153 AM MsiExec.exe 7560    RegOpenKey  HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE    SUCCESS Desired Access: Read
10:34:31.5744407 AM MsiExec.exe 7560    RegQueryValue   HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE\ProductName    SUCCESS Type: REG_SZ, Length: 38, Data: UniversalForwarder
10:34:31.5744637 AM MsiExec.exe 7560    RegCloseKey HKCR\Installer\Products\B0271F4D65C5D084FA81634DC56AD4AE    SUCCESS 
Run Code Online (Sandbox Code Playgroud)


现在事情变得有趣了!我删除了期望成功的键,运行客户端应用程序部署和评估周期,我得到了同样令人失望的结果。我仔细检查了这些密钥的 NTFS 权限,并且系统具有完全控制权,这似乎反驳了这个答案,表明0x80004005. 嗯嗯。如果我手动运行安装怎么办?

相同的安装程序,相同的安装参数(从 AppEnforce.log 中复制并粘贴),从以管理员身份运行 cmd.exe 提示符运行,但在同一步骤失败并出现相同错误。如果我返回并再次删除注册表项,然后从 cmd.exe 重新运行安装程序,它就可以工作了! 大声笑?

让我们重新总结一下:

  • 如果存在注册表项,则安装程序在DetermineContextForAllProducts安装步骤失败,无论是由 SCCM 客户端运行还是由我手动运行。
  • 如果我删除注册表项,SCCM 客户端会尝试运行安装程序并在该DetermineContextForAllProducts步骤中失败。
  • 如果我删除注册表项,并从以管理员身份运行 cmd.exe 提示中使用相同的参数手动运行相同的安装程序,它会成功!¯\_(?)_/¯
  • 我在两个非常不同的服务器上得到相同的结果。


有任何想法吗?如果有帮助,我很乐意提供我的 ProcMon 事件或任何其他信息的完整副本。

小智 5

刚刚收到支持人员的回复。这是 6.2.2 中的一个已知问题,并且已经准备好在即将发布的版本中发布修复程序。我不能向您保证版本号,但您可以查看缺陷号 SPL-95121 的发行说明。