所有 Windows Server 2019 EC2 实例的 SMS 修补失败

0

【以下的问题经过翻译处理】 我刚开始使用 SMS 来管理 Windows 2019 Server EC2 实例补丁(安全更新)。我注意到默认情况下,AWS 会阻止 Windows 操作系统自动运行 Windows 更新。我按照 SMS 快速设置的说明进行操作,我的服务器的修补失败并显示以下错误消息:(我整天都在搜索解决这个问题的方法。修改注册表设置,运行 DSIM 命令等。没有任何帮助。看起来像某种类型的证书问题,但我无法解决)。 还有其他人在获取 SMS 修补 AWS Windows Server 2019 EC2 实例方面遇到过问题吗?

报错信息参考如下:

Invoke-PatchBaselineOperation : Exception Details: An error occurred when attempting to search Windows Update. Exception Level 1: Error Message: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. (Exception from HRESULT: 0x800B0109) Stack Trace: at WUApiLib.IUpdateSearcher.Search(String criteria) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateAgent.SearchForUpdates(String searchCriteria) At C:\ProgramData\Amazon\SSM\InstanceData\i-03638bdca902ef8fd\document\orchestration\86ed2eda-065a-49d3-b084-69bfc89c14 3d\PatchWindows_script.ps1:233 char:13

    $response = Invoke-PatchBaselineOperation -Operation Scan -SnapshotId ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        CategoryInfo : OperationStopped: (Amazon.Patch.Ba...UpdateOperation:FindWindowsUpdateOperation) [Invoke -PatchBaselineOperation], Exception

        FullyQualifiedErrorId : Exception Level 1: Error Message: Exception Details: An error occurred when attempting to search Windows Update. Exception Level 1: Error Message: A certificate chain processed, but terminated in a root certificate which is not trusted by the t rust provider. (Exception from HRESULT: 0x800B0109) Stack Trace: at WUApiLib.IUpdateSearcher.Search(String criteria) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateAgent.SearchForUpdates(String searc hCriteria)

        Stack Trace: at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateAgent.SearchForUpdates( String searchCriteria) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateOperation.SearchAndProcessResult(Lis t1 kbGuids) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateOperation.SearchByGuidsPaginated(Lis t1 kbGuids, Int32 maxPageSize) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateOperation.FilterWindowsUpdateSearch( List`1 filteringMethods) at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.FindWindowsUpdateOperation.DoWindowsUpdateOperati on() at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateOperation.DoBeginProcessing() ,Amazon.Patch.Baseline.Operations.PowerShellCmdlets.InvokePatchBaselineOperation

failed to run commands: exit status 4294967295
profile picture
专家
已提问 5 个月前45 查看次数
1 回答
0

【以下的回答经过翻译处理】 你好! SSM 使用 Windows 更新 API 来安装更新。这意味着 Windows 更新报告的任何问题都会发送回 SSM。手动使用 Windows Update 会产生与您当前遇到的相同的结果。

Windows Update 的工作方式是下载 .CAB 格式的更新。这些更新使用证书签名。在非常高的级别上,对证书进行评估以确保它没有过期并且它是由 CA(证书颁发机构)颁发的。

这是证书链接过程的一部分。在正常情况下,CA 将来自 Microsoft。 Windows 操作系统必须信任所使用的 CA,因此根 CA 证书应存在于受信任的根和受信任的发布者证书存储下,您可以在运行 mmc(Microsoft 管理控制台)并在工具中添加证书管理单元时看到.

当您使用 WSUS 时,会发生 0x800B0109 消息的常见问题。 WSUS 是一种可以安装在 Windows 服务器上以允许下载和安装更新的服务。如果您有多台机器并且想要节省一些 Internet 带宽,或者如果您在控制补丁安装时需要粒度,这将很有用。 WSUS 需要绑定到 WSUS 服务器的自签名证书,并且需要通过组策略部署此证书。因此,这里有一些问题可能有助于查明问题:

1.实例是否加入域? 2. 您是否使用 WSUS 或任何会更改 Windows 更新下载位置源的机制?如果是这样,请确保您的 WSUS 证书没有过期,并且您有一个组策略可以在每台要安装更新的计算机上安装此证书。 3. 您是否有适当的组策略来配置 Windows 更新?您可以通过打开本地组策略编辑器(如果未加入域)或在已加入域并安装了此工具的计算机上转到组策略管理选项来查看此信息。组策略位于计算机配置 > 管理模板 > Windows 组件 > Windows 更新下。您还可以在任何受影响的实例中运行命令“rsop.msc”以查看应用于该实例的所有组策略。 4. 实例是否可以通过互联网网关或 NAT 网关直接访问互联网?确保实例使用的安全组和网络 ACL 具有允许流量的出站规则。

如果您未使用 WSUS 或实例未加入域,则表明操作系统不信任 Microsoft 证书,这种情况不太常见。您可能需要按照 Microsoft 文档 https://docs.microsoft.com/en-us/powershell/module/windowsupdate/get-windowsupdatelog?view=windowsserver2022-ps 中的说明运行 Get-WindowsUpdateLog 以进行故障排除。有多个教程解释了如何重置所有 Windows 更新组件,您可能已经尝试过。由于 AWS 责任共担模型 https://aws.amazon.com/compliance/shared-responsibility-model/,这是一个 Windows 操作系统问题,为了您自己的安全和隐私,AWS 在运行的操作系统内部没有可见性。但是,我相信以上信息会对您有所帮助。如果您有任何问题,请告诉我。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则