[chef] Re: Re: Re: HTTP Request Returned 401 Unauthorized: Failed to authenticate?


Chronological Thread 
  • From: Rafal Bluszcz Zawadzki < >
  • To:
  • Subject: [chef] Re: Re: Re: HTTP Request Returned 401 Unauthorized: Failed to authenticate?
  • Date: Thu, 9 Jun 2011 11:17:00 +0200

Hi guys, thanks for reply.

Yesterday I posted link my problem on IRC and Joshua helped me immedietaly - the problem was that I already bootstraped this box as node, but with bad FQDN.

Later, I removed the node from the platform - and bootstraped again. 

After removing /etc/chef/client.pem (which came with previously bootstrap) everything started to work.

On Thu, Jun 9, 2011 at 8:02 AM, Ringo De Smet < "> > wrote:
Nowadays, Chef gives a clear message if client and server are out of
sync. Rafal's case is not like that. Check that in the server, the
name specified there for the node is exactly the same as specified in
/etc/chef/client.rb (or wherever your config is). If these are OK, I
suggest you regenerate the client key on the server and put the new
private key on the node and retry.

On 8 June 2011 17:53, Akzhan Abdulin < "> > wrote:
> Typical issue is out of time sync between chef server and node.
> So always check that ntp daemon installed and ran.
>
> 2011/6/8 Rafal Bluszcz Zawadzki < "> >
>>
>> Hi, I have following problem installing new node (I am installing it
>> in same way like rest of nodes), and I am pretty lost at this moment.
>>
>> Where I should start debugging? (I replace my FQDN with example.com in
>> following example)
>>
>> :~/work/headnet/chef-repo-headnet$ knife bootstrap
>> khaki.example.com --sudo -x rafal
>> Bootstrapping Chef on khaki.example.com
>> khaki.example.com knife sudo password:
>> Enter your password:
>> khaki.example.com
>> khaki.example.com GET http://rubygems.org/latest_specs.4.8.gz
>> khaki.example.com 302 Found
>> ..........
>> khaki.example.com /usr/lib/ruby/gems/1.8/gems/chef-0.10.0/bin/shef
>> khaki.example.com /usr/bin/chef-client
>> khaki.example.com /usr/bin/chef-solo
>> khaki.example.com /usr/bin/knife
>> khaki.example.com /usr/bin/shef
>> khaki.example.com Successfully installed chef-0.10.0
>> khaki.example.com 1 gem installed
>> khaki.example.com [Wed, 08 Jun 2011 17:32:36 +0200] INFO: *** Chef 0.10.0
>> ***
>> khaki.example.com [Wed, 08 Jun 2011 17:32:40 +0200] INFO: HTTP Request
>> Returned 401 Unauthorized: Failed to authenticate as
>> khaki.example.com. Ensure that your node_name and client key are
>> correct.
>> khaki.example.com [Wed, 08 Jun 2011 17:32:40 +0200] FATAL: Stacktrace
>> dumped to /var/chef/cache/chef-stacktrace.out
>> khaki.example.com [Wed, 08 Jun 2011 17:32:40 +0200] FATAL:
>> Net::HTTPServerException: 401 "Unauthorized"
>> :~/work/headnet/chef-repo-headnet$
>>
>> --
>> Rafał Zawadzki
>> Senior Backend Developer
>
>



--
Rafał Zawadzki
Senior Backend Developer 




Archive powered by MHonArc 2.6.16.

§