Error executing action `download` on resource 'wsus_client_update[WSUS updates]


Hi All,

I’m trying to install windows updates using wsus-client cookbook. When I log into a server and run this cookbook I see no error and updates working properly. When I use the same cookbook with ‘packer’ to windows update I get the below error.

So far I came to know that this is ‘Access denied’ error. Can someone help me what access being denied here or any permission need to provided?

00:06:08.927 amazon-ebs: ================================================================================e[0m
00:06:08.928 amazon-ebs: e[31mError executing action download on resource ‘wsus_client_update[WSUS updates]‘e[0m
00:06:08.929 amazon-ebs: ================================================================================e[0m
00:06:08.929 amazon-ebs:
00:06:08.930 amazon-ebs: e[0mWIN32OLERuntimeErrore[0m
00:06:08.930 amazon-ebs: --------------------e[0m
00:06:08.931 amazon-ebs: (in OLE method CreateUpdateDownloader': ) 00:06:08.931 amazon-ebs: e[0m OLE error code:80070005 in <Unknown> 00:06:08.932 amazon-ebs: e[0m <No Description> 00:06:08.932 amazon-ebs: e[0m HRESULT error code:0x80020009 00:06:08.932 amazon-ebs: e[0m Exception occurred.e[0m 00:06:08.933 amazon-ebs: 00:06:08.933 amazon-ebs: e[0mResource Declaration:e[0m 00:06:08.934 amazon-ebs: ---------------------e[0m 00:06:08.935 amazon-ebs: # In c:/chef-repo/.chef/local-mode-cache/cache/cookbooks/wsus-client/recipes/update.rb 00:06:08.935 amazon-ebs: e[0m 00:06:08.935 amazon-ebs: e[0m 25: wsus_client_update 'WSUS updates' do 00:06:08.936 amazon-ebs: e[0m 26: node['wsus_client']['update'].each { |property, value| send(property, value) } 00:06:08.937 amazon-ebs: e[0m 27: end 00:06:08.937 amazon-ebs: e[0m 00:06:08.938 amazon-ebs: e[0mCompiled Resource:e[0m 00:06:08.938 amazon-ebs: ------------------e[0m 00:06:08.938 amazon-ebs: # Declared in c:/chef-repo/.chef/local-mode-cache/cache/cookbooks/wsus-client/recipes/update.rb:25:infrom_file’
00:06:08.939 amazon-ebs: e[0m
00:06:08.939 amazon-ebs: e[0mwsus_client_update(“WSUS updates”) do
00:06:08.940 amazon-ebs: e[0m action [:download, :install]
00:06:08.940 amazon-ebs: e[0m retries 0
00:06:08.941 amazon-ebs: e[0m retry_delay 2
00:06:08.942 amazon-ebs: e[0m default_guard_interpreter :default
00:06:08.942 amazon-ebs: e[0m declared_type :wsus_client_update
00:06:08.942 amazon-ebs: e[0m cookbook_name “wsus-client”
00:06:08.943 amazon-ebs: e[0m recipe_name “update”
00:06:08.943 amazon-ebs: e[0m download_timeout 3600
00:06:08.944 amazon-ebs: e[0m install_timeout 3600
00:06:08.945 amazon-ebs: e[0m reboot_delay 1
00:06:08.945 amazon-ebs: e[0mend
00:06:08.945 amazon-ebs: e[0m
00:06:08.946 amazon-ebs: e[0mPlatform:e[0m
00:06:08.946 amazon-ebs: ---------e[0m
00:06:08.947 amazon-ebs: i386-mingw32e[0m
00:06:08.947 amazon-ebs:
00:06:08.948 amazon-ebs: e[0m[2018-07-04T10:49:34+00:00] INFO: Running queued delayed notifications before re-raising exception
00:06:08.948 amazon-ebs: [2018-07-04T10:49:34+00:00] ERROR: Running exception handlers
00:06:08.949 amazon-ebs: [2018-07-04T10:49:34+00:00] ERROR: Exception handlers complete
00:06:08.949 amazon-ebs: [2018-07-04T10:49:34+00:00] FATAL: Stacktrace dumped to c:/chef-repo/.chef/local-mode-cache/cache/chef-stacktrace.out
00:06:08.950 amazon-ebs: [2018-07-04T10:49:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
00:06:08.951 amazon-ebs: [2018-07-04T10:49:34+00:00] FATAL: WIN32OLERuntimeError: wsus_client_update[WSUS updates] (wsus-client::update line 25) had an error: WIN32OLERuntimeError: (in OLE method `CreateUpdateDownloader’: )
00:06:08.951 amazon-ebs: OLE error code:80070005 in
00:06:08.952 amazon-ebs:
00:06:08.952 amazon-ebs: HRESULT error code:0x80020009
00:06:08.953 amazon-ebs: Exception occurred.
00:06:08.955 ==> amazon-ebs: Terminating the source AWS instance…

Please help!!!



Make sure you can download and connect to your wsus server via a script and confirm that works. Most of the issues I’ve had with this cookbook ended up being communication issues with wsus.


It’s likely a UAC issue… My work around was to create windows task and have it do a chef-client run specifying the recipe or cookbook.