Saturday, November 17, 2018

Amazon AWS EC2 - solution to windows update doesn't work

Don't know if it is related specifically to EC2 but anyway i had a windows 2012 server that refused to update when i told it to be automatic or tried to initiate it from the windows update UI.

In the event log i got this message:
"Unable to Connect: Windows is unable to connect to the automatic updates service and therefore cannot download and install updates according to the set schedule. Windows will continue to try to establish a connection."

The solution was to run it manually by this command line:

wuauclt.exe /updatenow


Another tip: if you are running a cheap low mem instance (e.g. t2.nano), restart your server as something stronger (e.g. t2.xlarge) and do all your windows updates from there and when done go back to the cheap instance. much faster and more reliable this way and the small amount of time used in the expensive instance is really low.