[chef] Re: knife bootstrap works and then fails with 401


Chronological Thread 
  • From: Vladimir Girnet < >
  • To:
  • Subject: [chef] Re: knife bootstrap works and then fails with 401
  • Date: Thu, 9 Aug 2012 09:21:02 +0300

And verify time, if no in sync with server, same error may appear. 

On Aug 9, 2012, at 4:06 AM, Kwasi Gyasi - Agyei wrote:

Try removing the client from server

knife client delete your-client-name-here

One other thing which could work is removing all keys files client and validation from both the server and client, regenerate new key files and distribute new validation.pem to the client then execute chef-client again.



On Thu Aug  9 01:47:08 2012, Zippy Zeppoli wrote:
I figure someone is going to ask this to troubleshoot:

Client:
# ls /etc/chef/
client.pem  client.rb  first-boot.json  validation.pem

Server:
# ls /etc/chef
client.pem  expander.rb  server.rb  solr.rb  validation.pem
webui.pem  webui.rb


On Wed, Aug 8, 2012 at 4:30 PM, Z < ">
< ">mailto: >> wrote:

   Hi List,
   I already checked the chef common errors faq, and I winded up
   here, so here
   goes.

   I ran :
   # knife bootstrap 10.161.95.253 -x root

   Everything worked:
   Fetching: treetop-1.4.10.gem (100%).10.gem
   10.161.95.253 Successfully installed treetop-1.4.10
   ....
   There were some errors fetching some gems, but thats not the core
   issue:
    ERROR:  Error installing yajl-ruby:

   And then:
    Successfully installed chef-0.10.6
    1 gem installed
    [2012-08-08T19:40:24-04:00] INFO: *** Chef 0.10.6 ***
    [2012-08-08T19:40:26-04:00] INFO: HTTP Request Returned 401
   Unauthorized:
   Failed to authenticate. Ensure that your client key is valid.
    [2012-08-08T19:40:26-04:00] FATAL: Stacktrace dumped to
   /var/chef/cache/chef-stacktrace.out
   [2012-08-08T19:40:26-04:00] FATAL: Net::HTTPServerException: 401
   "Unauthorized"

   kaboom.

   Why?

   Thanks!



--
Vladimir Girnet
Infrastructure Engineer
Tacit Knowledge
http://www.tacitknowledge.com




Archive powered by MHonArc 2.6.16.

§