Another Chef Windows service issue?


#1

Hi,
With Tim’s help, I was able to fix the windows service issue earlier. Now I am running into other issue,

windows_package “Some Client” do
source "http://localhost/example.exe"
installer_type :custom
options "/verysilent /norestart /dir=c:\tools\\example"
action :install
end

when I run chef-client from commandline (ie manually ),it is fine. when I run it as windows service, I got this error

2012-08-20T12:31:39-07:00] INFO: Processing windows_package[Git Client] action install (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb)
[2012-08-20T12:31:39-07:00] ERROR: windows_package[Git Client] (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb) has had an error
[2012-08-20T12:31:39-07:00] ERROR: windows_package[Git Client] (c:/chef/cache/cookbooks/windows_base/recipes/default.rb:20:in from_file') had an error: windows_package[Git Client] (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb) had an error: ArgumentError: unknown encoding name - CP0 C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:172:infind’
C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:172:in initialize' C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:231:inexception’
C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:231:in raise' C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:231:incheck’
C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:277:in EnumKey' C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:551:ineach_key’
c:/chef/cache/cookbooks/windows/providers/package.rb:201:in block in extract_installed_packages_from_key' C:/Tools/opscode/chef/embedded/lib/ruby/1.9.1/win32/registry.rb:389:inopen’
c:/chef/cache/cookbooks/windows/providers/package.rb:200:in extract_installed_packages_from_key' c:/chef/cache/cookbooks/windows/providers/package.rb:183:ininstalled_packages’
c:/chef/cache/cookbooks/windows/providers/package.rb:107:in current_installed_version' c:/chef/cache/cookbooks/windows/providers/package.rb:98:inload_current_resource’
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource.rb:453:in run_action' C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:49:inrun_action’
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in block (2 levels) in converge' C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:ineach’