# ArgumentError: Cannot find a version for node

**URL:** <https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709>\
**Category:** Chef Infra (archive)\
**Created:** [September 20, 2018, 2:38pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709 "2018-09-20T14:38:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhugley](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mhugley](https://discourse.chef.io/u/mhugley)\
**Post date:** [September 20, 2018, 2:38pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/1 "2018-09-20T14:38:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cheeseplus](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/cheeseplus/32/960_2.png) [@cheeseplus](https://discourse.chef.io/u/cheeseplus)\
**Post date:** [September 20, 2018, 2:49pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/2 "2018-09-20T14:49:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mhugley](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mhugley](https://discourse.chef.io/u/mhugley)\
**Post date:** [September 20, 2018, 3:16pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/3 "2018-09-20T15:16:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vidalrafael](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vidalrafael](https://discourse.chef.io/u/vidalrafael)\
**Post date:** [June 15, 2020, 3:48pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/4 "2020-06-15T15:48:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Swampcritter](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Swampcritter](https://discourse.chef.io/u/Swampcritter)\
**Post date:** [June 15, 2020, 5:11pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/5 "2020-06-15T17:11:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vidalrafael](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vidalrafael](https://discourse.chef.io/u/vidalrafael)\
**Post date:** [June 15, 2020, 5:15pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/6 "2020-06-15T17:15:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Swampcritter](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Swampcritter](https://discourse.chef.io/u/Swampcritter)\
**Post date:** [June 15, 2020, 5:24pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/7 "2020-06-15T17:24:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vidalrafael](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vidalrafael](https://discourse.chef.io/u/vidalrafael)\
**Post date:** [June 15, 2020, 5:26pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/8 "2020-06-15T17:26:04Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![vidalrafael](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vidalrafael](https://discourse.chef.io/u/vidalrafael)\
**Post date:** [June 16, 2020, 11:29am UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/9 "2020-06-16T11:29:05Z")

</div>

> [@Swampcritter](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![vidalrafael](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vidalrafael](https://discourse.chef.io/u/vidalrafael)\
**Post date:** [June 18, 2020, 9:04pm UTC](https://discourse.chef.io/t/argumenterror-cannot-find-a-version-for-node/13709/10 "2020-06-18T21:04:36Z")

</div>

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.
