# Exception on second client run for windows\_package resource

**URL:** <https://discourse.chef.io/t/exception-on-second-client-run-for-windows-package-resource/6552>\
**Category:** Chef Infra (archive)\
**Created:** [April 2, 2015, 10:50am UTC](https://discourse.chef.io/t/exception-on-second-client-run-for-windows-package-resource/6552 "2015-04-02T10:50:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nils\_Cant](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@Nils\_Cant](https://discourse.chef.io/u/Nils_Cant)\
**Post date:** [April 2, 2015, 10:50am UTC](https://discourse.chef.io/t/exception-on-second-client-run-for-windows-package-resource/6552/1 "2015-04-02T10:50:35Z")

</div>

Hi,

I have defined the following resource in my recipe:

# Install the WebDeploy msi

windows\_package "WebDeploy" do  
source "#{Chef::Config[:file\_cache\_path]}/WebDeploy\_amd64\_en-US.msi"  
end

This succeeds upon the first run, but throws an error on any subsequent  
runs:

> PS C:\chef\cache\> chef-client  
> Starting Chef Client, version 12.2.1  
> [2015-04-02T12:22:18+02:00] INFO: \*\*\* Chef 12.2.1 \*\*\*  
> [2015-04-02T12:22:18+02:00] INFO: Chef-client pid: 2856  
> [2015-04-02T12:22:40+02:00] INFO: Run List is [role[iis]]  
> [2015-04-02T12:22:40+02:00] INFO: Run List expands to [bor\_generic\_prd\_server\_win::default, bor\_apps\_iis::default]  
> [2015-04-02T12:22:40+02:00] INFO: Starting Chef Run for fdnweb-dmzprd.dev.prd  
> [2015-04-02T12:22:40+02:00] INFO: Running start handlers  
> [2015-04-02T12:22:40+02:00] INFO: Start handlers complete.  
> [2015-04-02T12:22:40+02:00] INFO: HTTP Request Returned 404 Not Found:  
> resolving cookbooks for run list: ["bor\_generic\_prd\_server\_win::default", "bor\_apps\_iis::default"]  
> [2015-04-02T12:22:40+02:00] INFO: Loading cookbooks [bor\_generic\_prd\_server\_win@0.1.0, bor\_apps\_iis@0.1.0]  
> Synchronizing Cookbooks:
> 
> - bor\_generic\_prd\_server\_win
> - bor\_apps\_iis  
> Compiling Cookbooks...  
> Converging 2 resources  
> Recipe: bor\_apps\_iis::webdeploy
> 
> - remote\_file[c:/chef/cache/WebDeploy\_amd64\_en-US.msi] action create[2015-04-02T12:22:40+02:00] INFO: Processing remote\_file[c:/chef/cache/WebDeploy\_amd64\_en-US.msi] action create (bor\_apps\_iis::webdeploy line 7)  
> (up to date)
> 
> - windows\_package[WebDeploy] action install[2015-04-02T12:22:41+02:00] INFO: Processing windows\_package[WebDeploy] act  
> ion install (bor\_apps\_iis::webdeploy line 12)
> 
> [2015-04-02T12:40:59+02:00] INFO: Running queued delayed notifications before re-raising exception
> 
> Running handlers:  
> [2015-04-02T12:40:59+02:00] ERROR: Running exception handlers  
> Running handlers complete  
> [2015-04-02T12:40:59+02:00] ERROR: Exception handlers complete  
> [2015-04-02T12:40:59+02:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out  
> Chef Client failed. 0 resources updated in 96.29897 seconds  
> [2015-04-02T12:40:59+02:00] FATAL: Chef::Exceptions:📦 windows\_package[WebDeploy] (bor\_apps\_iis::webdeploy line 1  
> 2) had an error: Chef::Exceptions:📦 No version specified, and no candidate version available for WebDeploy

I'm not supposed to write my own guard, am I?

Thanks in advance,

Nils
