About Me

My photo
Cloud Operations Team Leader at Conduit - http://il.linkedin.com/in/shavit

Friday, September 14, 2012

Chef-client 401 "Unauthorized"

If you get this : Net::HTTPServerException: 401 "Unauthorized"
when running chef-client, you need to verify that you have the fqdn / node name (node_name) in your client configuration.


so how to solve it:

  1. vi /etc/chef/client.rb
  2. add the hostname (node name) as follow (replace the NAME with your server name): node_name "NAME"
  3. save the file
  4. run chef-client and enjoy
also the following error can point on the same issue: http://chef-server:4040/nodes/localhost
the localhost is the default, so you must change the node name to you hostname.
BTW - the hostname is the same name you can find when running: knife client list

No comments:

Post a Comment