System Manager Baseline fails trying to search for updates

0

Starting this week we received the following when SSM ran our monthly patch baselines. The only change to the servers since the baseline starting failing is the servers were joined to our simple AD directory via the SSM domain join command. I can login to the server an manually run windows update and it completes and finds the missing KBs, but the System manager documents generate this error. Any assistance is appreciated.

[PatchNow Application Log Output]
2017-12-17T19:36:06.950 [INFO] - Install-WindowsUpdates -UpdateLevel Important
2017-12-17T19:36:06.964 [INFO] - includeRecommendedUpdates = False
2017-12-17T19:36:06.969 [INFO] - Creating state file directory C:\ProgramData\Amazon\PatchNow\State\
2017-12-17T19:36:06.977 [INFO] - Started collecting Windows Update Log information.
2017-12-17T19:36:06.977 [INFO] - Beginning operation.
2017-12-17T19:36:06.991 [INFO] - Checking for state files.
2017-12-17T19:36:06.998 [INFO] - Set up file based logging to: C:\ProgramData\Amazon\PatchNow\Logs\Install-WindowsUpdates-2017-12-17-19-36-06.log
2017-12-17T19:36:06.999 [INFO] - ResumeFromReboot = False
2017-12-17T19:36:06.999 [INFO] - Creating the state file C:\ProgramData\Amazon\PatchNow\State\1e3f1ce0-c964-4876-a3b3-bad42714726e.json
2017-12-17T19:36:07.002 [INFO] - Searching for updates.
2017-12-17T19:37:14.320 [INFO] - Releasing the file lock on the state file C:\ProgramData\Amazon\PatchNow\State\1e3f1ce0-c964-4876-a3b3-bad42714726e.json
2017-12-17T19:37:14.321 [INFO] - Deleting state file C:\ProgramData\Amazon\PatchNow\State\1e3f1ce0-c964-4876-a3b3-bad42714726e
---Output truncated---
----------ERROR-------
failed to run commands: exit status 4294967295
Install-WindowsUpdates : Exception Details: An error occurred when attempting
to search Windows Update.
Exception Level 1:
Error Message: Exception from HRESULT: 0x8024401C
Stack Trace: at WUApiLib.IUpdateSearcher.Search(String criteria)
at PatchNow.Implementations.WindowsUpdateAgent.Search()
At line:1 char:1

  • Install-WindowsUpdates -UpdateLevel Important
  •   + CategoryInfo          : OperationStopped: (PatchNow.Implem...UpdateOpera   
     tion:InstallWindowsUpdateOperation) \[Install-WindowsUpdates], Exception  
      + FullyQualifiedErrorId : Exception Level 1:  
      	Error Message: Exception Details: An error occurred when attempting to se   
     arch Windows Update.  
      Exception Level 1:  
      	Error Message: Exception from HRESULT: 0x8024401C  
      	Stack Trace:    at WUApiLib.IUpdateSearcher.Search(String criteria)  
      	   at PatchNow.Implementations.WindowsUpdateAgent.Search()  
        
        
      	Stack Trace:    at PatchNow.Implementations.InstallWindowsUpdateOperation   
     .DoWindowsUpdateOperation()  
      	   at PatchNow.Implementations.WindowsUpdateOper  
    

---Error truncated----

chocker
asked 6 years ago3296 views
5 Answers
0

Hi,

Sorry to hear you're having problems patching your instances. Just to clarify, what document are you using to patch? From the output you posted, it looks as if you're using the AWS-InstallWindowsUpdates (as opposed to AWS-RunPatchBaseline which would be using a patch baseline), is that correct?

Could you also share the version of Windows you are using?

Thanks!

profile pictureAWS
Mats
answered 6 years ago
0

Thanks the response, I apologize I uploaded the logs from my manual run to see if I got a different result from the InstallMissingWindowsUpdates document. For our automated patching we are using the RunPatchBaseline, here is the output for the automated run. This is on a Windows 2012 R2 instance.

----------ERROR-------
failed to run commands: exit status 4294967295
Invoke-PatchBaselineOperation : Exception Details: An error occurred when
attempting to search Windows Update.
Exception Level 1:
Error Message: Exception from HRESULT: 0x8024401C
Stack Trace: at WUApiLib.IUpdateSearcher.Search(String criteria)
at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUpdateA
gent.Search()
At C:\ProgramData\Amazon\SSM\InstanceData\i-0ac5ab3dbe4318e82\document\orchestr
ation\0e73b1e6-ec2b-4197-b629-39368de53fbd\PatchWindows_script.ps1:187 char:13

  • $response = Invoke-PatchBaselineOperation -Operation Install -Snapsho ...
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    
    • CategoryInfo : OperationStopped: (Amazon.Patch.Ba...UpdateOpera
      tion:InstallWindowsUpdateOperation) [Invoke-PatchBaselineOperation], Excep
      tion

    • FullyQualifiedErrorId : Exception Level 1:
      Error Message: Exception Details: An error occurred when attempting to se
      arch Windows Update.
      Exception Level 1:
      Error Message: Exception from HRESULT: 0x8024401C
      Stack Trace: at WUApiLib.IUpdateSearcher.Search(String criteria)
      at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsU
      pdateAgent.Search()

      Stack Trace: at Amazon.Patch.Baseline.Operations.PatchNow.Implementati
      ons.InstallWindowsUpdateOperation.DoWindowsUpdateOperation()
      at Amazon.Patch.Baseline.Operations.PatchNow.Implementations.WindowsUp
      dateOperation.DoBeginProcessing()
      ,Amazon.Patch.Baseline.Operations.PowerShellCmdlets.InvokePatchBaselineOpe
      ration

chocker
answered 6 years ago
0

According to https://answers.microsoft.com/en-us/windows/forum/windows_10-update/windows-10-update-error-0x8024401c/130e1025-9207-44aa-a730-950dd5a69bcb, this error code (0x8024401C) indicates the instance isn't able to connect to the Windows Update service. Microsoft recommends running the Windows Update troubleshooter in these cases.

Patch Manager needs to be able to connect to the Windows Update service in order to download and install the required updates.

Could you please try this and see if it helps in your case?

Thanks!

profile pictureAWS
Mats
answered 6 years ago
0

The issue was I had some WSUS settings left from prior to moving to System Manager Patch Baselines.

In particular:

HKEY_LOCAL_MACHINE > Software > Policies > Microsoft > Windows > WindowsUpdate > UseWUServer was set to 1 and our WSUS server was no longer online.

Thanks for the help it lead me in the right direction.

chocker
answered 6 years ago
0

Glad to hear it's working now, please let us know how Patch Manager works out for you.

/Mats

profile pictureAWS
Mats
answered 6 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions