我试图将Splunk UniversalForwarder作为使用MSI部署types的SCCM应用程序部署到一小组testing服务器,并遇到与MSI安装程序一反常态混淆的问题。
部署types本身非常简单。 我将MSI文件(splunkforwarder-6.2.1-245427-x64-release.msi)上载到SCCM站点服务器,并让侦测方法从MSI自动填充。 我做的唯一的事情就是改变安装string以包含以下参数:
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
由于包含了/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.
有一点Google-fu,我在Splunk的社区支持上find了这个post,但是我对于答案的正确性并不十分自信。 但是失败的安装程序步骤是 GetInstalledSplunkSettings所以也许我应该通过registry来查看过时的Product或Installer键是否错误地导致安装程序尝试卸载不存在的UniversalForwarder实例。
ProcMon和手动searchregistry的组合,我设法find似乎是相关的以下键。
HKCR:\Installer\Products\B0271F4D65C5D084FA81634DC56AD4A HKCR:\Installer\Features\B0271F4D65C5D084FA81634DC56AD4AE HKCR:\Installer\UpgradeCodes\13631B46466632F4FA2E89CF8E9602DB HKLM:\SOFTWARE\Classes\Installer\Features\B0271F4D65C5D084FA81634DC56AD4AE HKLM:\SOFTWARE\Classes\Installer\UpgradeCode\13631B46466632F4FA2E89CF8E9602DB
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
现在事情变得有趣了! 我删除了期待成功的密钥,运行客户端应用程序部署和评估周期,我也得到了同样令人失望的结果。 我加倍检查这些键的NTFS权限和系统有完全控制这似乎是反驳这个答案,指示0x80004005 。 Hmmmmm。 如果我手动运行安装呢?
相同的安装程序,相同的安装参数(从AppEnforce.log中复制并粘贴),从“以pipe理员身份运行”cmd.exe提示符运行,并且在同一步骤中失败并显示相同的错误。 如果我回去并再次删除registry项,并从cmd.exe重新运行安装程序, 它的工作原理! LOL WUT?
我们重新上限:
DetermineContextForAllProducts安装步骤中失败,这两个步骤都由SCCM客户端运行并由我手动执行。 DetermineContextForAllProducts步骤失败。 ¯\_(ツ)_/¯ 有任何想法吗? 我很乐意提供我的ProcMon事件或任何其他信息的完整副本,如果这将有所帮助。
刚刚听到支持。 这是6.2.2中的一个已知问题,并且即将发布的版本中已经有一个修复程序可供发布。 我不能向您保证版本号,但您可以查看缺陷编号SPL-95121的发行说明。
它也发生在我正在尝试安装Splunk 6.2.2时抛出Windows的命令行。
经过与ProcMon的一些研究,我发现问题是因为Splunkfind了另一个安装。
它在包含产品代码的以下registry项中进行search:
HKU\S-1-5-18\Software\Microsoft\Installer\Products HKCR\Installer\Products HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Managed\S-1-5-18\Installer\Products HKU\.DEFAULT\Software\Microsoft\Installer\Products
出于某种原因,它与您提到的错误失败,而不是预期的MSI错误。
查看这些registry项并尝试找出造成问题的那个