- From: Tim Dunphy <
>
- To:
- Subject: [chef] can't bootstrap 1st node
- Date: Wed, 26 Dec 2012 21:10:10 -0500
Hello List,
Just getting my feet wet with chef. Been using puppet for a while now. But chef is much better for my current needs. I did a gem install of the client on a centos 5.6 client box and am trying to get it to communicate with an ubuntu 12.04 chef server that I built. I was able to knife bootstrap the chef server without much problem.
However after do a gem install of chef client 10.14 client on the centos box and running this command:
knife bootstrap -N
mydomain.com chef.mydomain.com -d centos5-gems -x root -P 'notapass'
I see the following output:
chef.mydomain.com Successfully installed chef-10.16.4
chef.mydomain.com 1 gem installed
chef.mydomain.com [2012-12-26T20:56:44-05:00] INFO: *** Chef 10.16.4 ***
chef.mydomain.comchef.mydomain.com [2012-12-26T20:56:45-05:00] INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate. Ensure that your client key is valid.
chef.mydomain.comchef.mydomain.comchef.mydomain.com ================================================================================
chef.mydomain.comchef.mydomain.com Chef encountered an error attempting to load the node data for "
mydomain.com"
chef.mydomain.comchef.mydomain.com ================================================================================
chef.mydomain.com
chef.mydomain.comchef.mydomain.com Authentication Error:
chef.mydomain.comchef.mydomain.com ---------------------
chef.mydomain.comchef.mydomain.com Failed to authenticate to the chef server (http 401).
chef.mydomain.com
chef.mydomain.comchef.mydomain.com Server Response:
chef.mydomain.comchef.mydomain.com ----------------
chef.mydomain.comchef.mydomain.com Failed to authenticate. Ensure that your client key is valid.
chef.mydomain.com
chef.mydomain.comchef.mydomain.com Relevant Config Settings:
chef.mydomain.comchef.mydomain.com -------------------------
chef.mydomain.comchef.mydomain.com chef_server_url "
http://chef.mydomain.com:4000"
chef.mydomain.comchef.mydomain.com node_name "
mydomain.com"
chef.mydomain.com
chef.mydomain.com client_key "/etc/chef/client.pem"
chef.mydomain.comchef.mydomain.com
chef.mydomain.com If these settings are correct, your client_key may be invalid.
chef.mydomain.comchef.mydomain.com
chef.mydomain.com [2012-12-26T20:56:45-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
chef.mydomain.comchef.mydomain.com [2012-12-26T20:56:45-05:00] FATAL: Net::HTTPServerException: 401 "Unauthorized"
chef.mydomain.comThe first time I saw this error I rm'd the entire contents of my /etc/chef folder and then did a gem uninstall chef ; gem install chef. But was surprised to see the same error again possibly blaming my /etc/chef/client.pem file which had been generated by the most recent install.
The contents of the stacktrace file are the following:
Generated at Tue Dec 25 10:12:38 -0500 2012
Net::HTTPServerException: 401 "Unauthorized"
/usr/lib/ruby/1.8/net/http.rb:2105:in `error!'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/rest.rb:282:in `raw_http_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/rest.rb:363:in `retriable_rest_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/rest.rb:249:in `raw_http_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/rest.rb:243:in `api_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/rest.rb:133:in `get_rest'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/node.rb:604:in `load'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/node.rb:588:in `find_or_create'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/client.rb:294:in `load_node'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/client.rb:409:in `do_run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/client.rb:176:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/application.rb:140:in `run_chef_client'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/application/client.rb:274:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/application/client.rb:267:in `loop'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/application/client.rb:267:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/../lib/chef/application.rb:72:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.16.4/bin/chef-client:26
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23
Which is weird because I can log into the chef server from the client with the password I used, or with ssh keys. I got the same result when I tried the knife bootstrap command with the -i flag and included my private key.
Can someone please give some clues to help me on the path to success with this?
Chef server is also 10.16
Chef Server (API) Version: 10.16.2
Thank you very much indeed.
Tim
--
GPG me!!
gpg --keyserver
pool.sks-keyservers.net --recv-keys F186197B
- [chef] can't bootstrap 1st node, Tim Dunphy, 12/26/2012
Archive powered by MHonArc 2.6.16.