ArgumentError: Cannot find a version for node

I was bootstrapping a Windows 2008 Enterprise Server and I am receiving this error.

   C:\Users\jl8hadm>chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json
Starting Chef Client, version 14.4.56

[2018-09-20T09:26:04-05:00] INFO: *** Chef 14.4.56 ***
[2018-09-20T09:26:04-05:00] INFO: Platform: x64-mingw32
[2018-09-20T09:26:04-05:00] INFO: Chef-client pid: 29040
[2018-09-20T09:26:04-05:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping...
[2018-09-20T09:26:04-05:00] WARN: Plugin Network: unable to detect ipaddress
[2018-09-20T09:26:06-05:00] INFO: Setting the run_list to ["recipe[chef-client]"] from CLI options

Running handlers:
[2018-09-20T09:26:06-05:00] ERROR: Running exception handlers
Running handlers complete
[2018-09-20T09:26:06-05:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2018-09-20T09:26:06-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2018-09-20T09:26:06-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-09-20T09:26:06-05:00] FATAL: ArgumentError: Cannot find a version for node[testserver]
ERROR: Failed to execute command on XX.XXX.5.145 return code 1
ERROR: Bootstrap command returned 1

The Ohai run reports this:
"os": "windows",
"os_version": null,
"platform": "windows",
"platform_version": null,
"platform_family": "windows",
"virtualization": {
"systems": {

The Server information:

Windows Server Enterprise
64-bit Operating System

Is this 2008 but not R2? If so Chef hasn't supported that for some time.

Its windows 2008. We do have some old servers around that need to be re-platformed eventually but I was hoping to get chef installed for the time being.

Hello, i have this same problem, but, my server is windows 2012.

e[36m172.16.8.149e[0m e[0m[2020-06-15T12:43:50-03:00] ERROR: Exception handlers complete

e[36m172.16.8.149e[0m Chef Client failed. 0 resources updated in 04 secondse[0m

e[36m172.16.8.149e[0m [2020-06-15T12:43:50-03:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out

e[36m172.16.8.149e[0m [2020-06-15T12:43:50-03:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report

e[36m172.16.8.149e[0m [2020-06-15T12:43:50-03:00] FATAL: ArgumentError: Cannot find a version for node[172.16.8.149]

e[31me[1mERROR:e[0m Failed to execute command on 172.16.8.149 return code 1

e[31me[1mERROR:e[0m Bootstrap command returned 1

And i can not start chef for my update.

Can you help me?

What does the c:/chef/cache/chef-stacktrace.out file show inside of it? Can you cut/paste the contents?

Sure.

Generated at 2020-06-15 13:45:22 -0300
ArgumentError: Cannot find a version for node[172.16.8.149]
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/platform/provider_mapping.rb:49:in find_platform_and_version' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/node.rb:336:in consume_external_attrs'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/policy_builder/expand_node_object.rb:126:in build_node' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/client.rb:488:in build_node'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/client.rb:269:in run' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/application.rb:303:in run_with_graceful_exit_option'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/application.rb:279:in block in run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/local_mode.rb:44:in with_server_connectivity'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/application.rb:261:in run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/application/client.rb:440:in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/lib/chef/application.rb:66:in run' C:/opscode/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37-universal-mingw32/bin/chef-client:25:in <top (required)>'
C:/opscode/chef/bin/chef-client:75:in load' C:/opscode/chef/bin/chef-client:75:in '

This is the stacktrace.out

What is it you are running at the command line? Need to see if it’s a cookbook, recipe or role related issue for diagnosis.

Also, what version of Chef and Chef client are you running?

If you run the following from the command line, what does it show?

chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json

I run this command.

the return:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>chef-client -c c:/chef/client.rb -j c:/chef/first-boot.js
on
Starting Chef Client, version 14.3.37
[2020-06-15T14:24:59-03:00] INFO: *** Chef 14.3.37 ***
[2020-06-15T14:24:59-03:00] INFO: Platform: x64-mingw32
[2020-06-15T14:24:59-03:00] INFO: Chef-client pid: 4084
[2020-06-15T14:24:59-03:00] INFO: The plugin path C:\chef\ohai\plugins does not
exist. Skipping...
[2020-06-15T14:24:59-03:00] WARN: Plugin Network: unable to detect ipaddress
[2020-06-15T14:25:04-03:00] INFO: Setting the run_list to from CLI options

Running handlers:
[2020-06-15T14:25:04-03:00] ERROR: Running exception handlers
Running handlers complete
[2020-06-15T14:25:04-03:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 04 seconds
[2020-06-15T14:25:04-03:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack
trace.out
[2020-06-15T14:25:04-03:00] FATAL: Please provide the contents of the stacktrace
.out file if you file a bug report
[2020-06-15T14:25:04-03:00] FATAL: ArgumentError: Cannot find a version for node
[172.16.8.149]

Hello. I saw the .out file, and this problem happens in "provider_mapping.rb", when the scrip try to set de "node", I highlight the line of exception.

content of file:

require "chef/log"
require "chef/exceptions"
require "chef/mixin/params_validate"
require "chef/version_constraint/platform"
require "chef/provider"

class Chef
class Platform

class << self
  def find_platform_and_version(node)
    platform = nil
    version = nil

    if node[:platform]
      platform = node[:platform]
    elsif node.attribute?("os")
      platform = node[:os]
    end

    raise ArgumentError, "Cannot find a platform for #{node}" unless platform

    if node[:platform_version]
      version = node[:platform_version]
    elsif node[:os_version]
      version = node[:os_version]
    elsif node[:os_release]
      version = node[:os_release]
    end

    **raise ArgumentError, "Cannot find a version for #{node}" unless version**

    [platform, version]
  end
end

end
end

I solve my problem, thanks for help.

My problem to be in problem to execute the "systeminfo" (command in prompt) does not work.

I need to stop services in windows and refresh my repository. some time after this command execute, I run this command my execution its work.