Bootstrapping error for Windows host

Hi,
during the first boot of the Chef-Client I see the error below. Any suggestion to solve it? I'm not able to identify the root cause.

Regards,
Rosario

C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/wmi-lite-1.0.0/lib/wmi-lite/wmi.rb:69:in rescue in start_query' : An error occurred when querying namespace 'root/cimv2' with query 'select * from Win32_OperatingSystem'. (WmiLite::WmiException) (in OLE method count': )
OLE error code:800700A4 in SWbemObjectSet
No more threads can be created in the system.
HRESULT error code:0x80020009
Exception occurred.
from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/wmi-lite-1.0.0/lib/wmi-lite/wmi.rb:65:in start_query' from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/wmi-lite-1.0.0/lib/wmi-lite/wmi.rb:39:in first_of'
from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef/platform/query_helpers.rb:33:in windows_server_2003?' from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef/win32/eventlog.rb:19:in <top (required)>'
from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef/event_loggers/windows_eventlog.rb:21:in <top (required)>' from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef/client.rb:42:in <top (required)>'
from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef/handler.rb:18:in <top (required)>' from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/lib/chef.rb:32:in <top (required)>'
from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from C:/opscode/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.18.31-universal-mingw32/bin/chef-client:23:in <top (required)>' from C:/opscode/chef/bin/chef-client:68:in load'
from C:/opscode/chef/bin/chef-client:68:in `'
ERROR: Failed to execute command on abc.domain.com return code 1
ERROR: Bootstrap command returned 1

Any solution?

You need to make sure the WINRM is listening, by default it is not setup.
https://msdn.microsoft.com/en-us/library/aa384372(v=vs.85).aspx

I’ll read your article but the installation via WinRM has gone fine. The bad thing is that during the first chef execution triggered by the knife bootstrap command I face this error.

What version of Windows are you bootstrapping? If 2003, support is a bit
ify…

No, it’s a Windows Server 2008 R2 (64 bit).

Anyway I’ve forced again the bootstrap from the workstation and it worked, even if I don’t know why :smiley:

1 Like

A similar problem with another node: it installs the chef-client but bootstrap stops at some point without warnings or errors. What do you suggest?

Installation completed successfully
Writing validation key...
A subdirectory or file C:\chef\trusted_certs already exists.
Validation key written.

C:\Users\Rosario>mkdir C:\chef\trusted_certs

C:\Users\Rosario>(
echo.-----BEGIN CERTIFICATE-----
echo.MIID1TCCAr2gAwIBAgIBADANBgkqhkiG9w0BAQsFADBUMQswCQYDVQQGEw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TOi4yWdw7qi3t9H0Wt65TNaUui+z4SwEAN6l123JkER1y39
echo.nz9hsgfozwzqplv7gSxvJdUxPx7ijJw2AQgv/NZqQa0IrT11zvEJIvskThkRvmkF
echo.H87bnGOS94ptEvNykeCeLtJq89+l/zUGE+qaJn+Y5Q6+F1icc2k8sXd9ngGoFfRI
echo.S5x3EXDvutx3ahPDhKgb9Y7fPQ5GMZRCXpn0AvSXlc2A0qJRWI8cVG2WjPAmBPxo
echo.OJrECFk/FYcsMKbLspGx7zVV2/ix8IjhVA==
echo.-----END CERTIFICATE-----
) 1>C:\chef/trusted_certs/ABC.crt

C:\Users\Rosario>(
echo.chef_server_url "https://ABC/organizations/pippo"
echo.validation_client_name "pippo-validator"
echo.file_cache_path "c:/chef/cache"
echo.file_backup_path "c:/chef/backup"
echo.cache_options ({:path => "c:/chef/cache/checksums", :skip_expires => true})
echo.# Using default node name (fqdn)
echo.log_level :info
echo.log_location STDOUT
echo.trusted_certs_dir "c:/chef/trusted_certs"
) 1>C:\chef\client.rb

C:\Users\Rosario>(echo.{"run_list":["role[chef-agent]"],"tags":["xyz","dwh"]} ) 1>C:\chef\first-boot.json

It’s windows…that’s why :grin: