Chef encountered an error attempting to load the node data for "module4"

6,285 views
Skip to first unread message

Conrad Taylor

unread,
Aug 11, 2014, 4:10:27 PM8/11/14
to learnchef-funda...@googlegroups.com
When I type

knife bootstrap URL  -x root -P Password -N module4 -r "role[webserver]"

I'm getting the following message:

================================================================================

uvo1ilefd4schorqxfc.vm.cld.sr Chef encountered an error attempting to load the node data for "module4"

uvo1ilefd4schorqxfc.vm.cld.sr ================================================================================

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr Authentication Error:

uvo1ilefd4schorqxfc.vm.cld.sr ---------------------

uvo1ilefd4schorqxfc.vm.cld.sr Failed to authenticate to the chef server (http 401).

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr Server Response:

uvo1ilefd4schorqxfc.vm.cld.sr ----------------

uvo1ilefd4schorqxfc.vm.cld.sr Failed to authenticate as 'module4'. Ensure that your node_name and client key are correct.

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr Relevant Config Settings:

uvo1ilefd4schorqxfc.vm.cld.sr -------------------------

uvo1ilefd4schorqxfc.vm.cld.sr chef_server_url   "https://api.opscode.com/organizations/ctfudwebinar1"

uvo1ilefd4schorqxfc.vm.cld.sr node_name         "module4"

uvo1ilefd4schorqxfc.vm.cld.sr client_key        "/etc/chef/client.pem"

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr If these settings are correct, your client_key may be invalid, or

uvo1ilefd4schorqxfc.vm.cld.sr you may have a chef user with the same client name as this node.

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr 

uvo1ilefd4schorqxfc.vm.cld.sr [2014-08-11T16:06:49-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

uvo1ilefd4schorqxfc.vm.cld.sr Chef Client failed. 0 resources updated in 2.322542844 seconds

uvo1ilefd4schorqxfc.vm.cld.sr [2014-08-11T16:06:49-04:00] ERROR: 401 "Unauthorized"

uvo1ilefd4schorqxfc.vm.cld.sr [2014-08-11T16:06:49-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Conrad Taylor

unread,
Aug 11, 2014, 4:21:54 PM8/11/14
to learnchef-funda...@googlegroups.com
Hi, here's a link to a Gist:


--

Think different and code well,

-Conrad

Conrad Taylor

unread,
Aug 11, 2014, 5:22:19 PM8/11/14
to learnchef-funda...@googlegroups.com
Hi, I was able to resolve this issue by performing the following action on the server:

sudo rm -rf /etc/chef/client.pem

RK B

unread,
Nov 21, 2014, 11:02:40 PM11/21/14
to learnchef-funda...@googlegroups.com
Thanks Buddy...this simple command at the server-sde, really helped me :)

Cheers !

Mario Zúniga

unread,
Apr 17, 2015, 2:10:47 AM4/17/15
to learnchef-funda...@googlegroups.com
Thank you very much, that worked for me, too.... you saved the day, now I can go to sleep :D haha

Naga Saketh Jaligama

unread,
Aug 4, 2015, 12:01:36 PM8/4/15
to learnchef-fundamentals-webinar
Hi,

I am using chef to create a basic vm in vcenter. Its able to create the vm uisng chef proviosning driver, But the chef-client is throwing errors.

Recipe:

------------------------------------------------------------------------------------------------------------------------
chef_gem 'chef-provisioning-vsphere' do
  action :install
  compile_time true
end

require 'chef/provisioning/vsphere_driver'

with_vsphere_driver host: 'vcenterhostname',
  insecure: true,
  user:     'username',
  password: 'password'

with_machine_options :bootstrap_options => {
  use_linked_clone: true,
  num_cpus: 2,
  memory_mb: 4096,
  network_name: ["VM Network"],
  datacenter: 'Sandbox',
  datastore: 'Datastore_Esx2', 
  resource_pool: 'Box-Cluster',
  template_name: 'TemplateName',
  template_folder: 'Templates/',
  customization_spec: {
    ipsettings: {
      dnsServerList: ['ipaddress']
    },
    :domain => 'domainname'
  },
  :ssh => {
    :user => 'root',
    :password => 'password',
    :paranoid => false,
  }
}

machine "Centos" do
   run_list ['vmware::machines']
end
----------------------------------------------------------
errors:
------------
Executing chef-client -l info on root@ipadddress

    [Centos] [2015-08-04T11:21:54-04:00] INFO: Forking chef instance to converge...

                  Starting Chef Client, version 12.4.1 [0m

                  [2015-08-04T11:21:54-04:00] INFO: *** Chef 12.4.1 ***

                  [2015-08-04T11:21:54-04:00] INFO: Chef-client pid: 9394

                  [2015-08-04T11:21:57-04:00] INFO: Run List is [recipe[vmware::machines]]

                  [2015-08-04T11:21:57-04:00] INFO: Run List expands to [vmware::machines]

                  [2015-08-04T11:21:57-04:00] INFO: Starting Chef Run for Centos

                  [2015-08-04T11:21:57-04:00] INFO: Running start handlers

                  [2015-08-04T11:21:57-04:00] INFO: Start handlers complete.

                  [2015-08-04T11:21:57-04:00] INFO: HTTP Request Returned 404 Not Found : Object not found: /reports/nodes/Centos/runs

                  resolving cookbooks for run list: ["vmware::machines"] [0m

                  [2015-08-04T11:22:02-04:00] INFO: Loading cookbooks [vmw...@1.28.0, xyz-base...@0.0.2, chef-...@2.5.0]

                  Synchronizing Cookbooks: [0m

                    - vmware [0m

                    - xyz-base-cookbook [0m

                    - chef-sugar [0m

                  Compiling Cookbooks... [0m

                  [0m

                  ================================================================================ [0m

                  [31mRecipe Compile Error [0m

                  ================================================================================ [0m

                  

                  [0mChef::Exceptions::RecipeNotFound [0m

                  -------------------------------- [0m

                  could not find recipe machines for cookbook vmware [0m

                  

                  [0m [0m

                  Running handlers: [0m

                  [2015-08-04T11:22:03-04:00] ERROR: Running exception handlers

                  Running handlers complete

                  [0m[2015-08-04T11:22:03-04:00] ERROR: Exception handlers complete

                  Chef Client failed. 0 resources updated in 8.948866571 seconds [0m

                  [2015-08-04T11:22:03-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

                  [2015-08-04T11:22:03-04:00] ERROR: could not find recipe machines for cookbook vmware

                  [2015-08-04T11:22:03-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

[2015-08-04T10:22:03-05:00] INFO: Completed chef-client -l info on root@ipaddress: exit status 1
    
    ================================================================================
    Error executing action `converge` on resource 'machine[Centos]'
    ================================================================================
    
    RuntimeError
    ------------
    Error: command 'chef-client -l info' exited with code 1.
    
    Resource Declaration:
    ---------------------
    # In C:/Users/xyz/.chef/local-mode-cache/cache/cookbooks/vmware-machines/recipes/machines.rb
    
     36: machine "Centos" do
     37:    #run_list ['vmware::machines']
     38: end
    
    Compiled Resource:
    ------------------
    # Declared in C:/Users/xyz/.chef/local-mode-cache/cache/cookbooks/vmware-machines/recipes/machines.rb:36:in `from_file'
    
    machine("Centos") do
      action :converge
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      chef_server {:chef_server_url=>"chefzero://localhost:8889", :options=>{:client_name=>"chef-local", :signing_key_filename=>"C:\\eclipse\\xyz\\workspace\\xyz\\vmware\\target\\.chef\\dummy.pem"}}
      machine_options {:bootstrap_options=>{:use_linked_clone=>true, :num_cpus=>2, :memory_mb=>4096, :network_name=>["VM Network"], :datacenter=>"Sandbox", :datastore=>"Datastore_Esx2", :resource_pool=>"Box-Cluster", :template_name=>"Template", :template_folder=>"Templates/", :customization_spec=>{:ipsettings=>{:dnsServerList=>["xyz"]}, :domain=>"xyz"}, :ssh=>{:user=>"root", :password=>"password", :paranoid=>false}}}
      declared_type :machine
      cookbook_name "vmware-machines"
      recipe_name "machines"
    end
    
[2015-08-04T10:22:03-05:00] INFO: Running queued delayed notifications before re-raising exception
-------------------------------------------------------------------------------------------------------------------------------------------------------------





harsh sarode

unread,
Feb 16, 2018, 5:22:49 AM2/16/18
to learnchef-fundamentals-webinar
hi Conrad Taylor,
i got with same error you had, but int my case the Relevant Config Settings: has "/etc/chef/validation.pem" instead for "/etc/chef/client.pem" , 
it is auto generated when i bootstrap with command:  knife bootstrap ip-address --ssh-user root -N ChefNode2 
---------------------------------------------------------------------------------------------
chef_server_url         "https://chefsr.server.com/organizations/abcorg"
validation_client_name  "chef-validator"
validation_key          "/etc/chef/validation.pem"

--------------------------------------------------------------------------------------------
so i tried deleteing "/etc/chef/validation.pem" , doesnt  worked out, but i can "knife ssl check -s https://chefsr.server.com/organizations/edrorg" from chefnode2 to chefServer and it also installing chefclient on ChefNode2 but i dont get ChefNode2 in list by " knife node list" from chefworkstation.

thanks


Reply all
Reply to author
Forward
0 new messages