Unauthorized Chef



This is my first deployment of a chef server and I am getting the following error when I attempt to bootstrap a windows server

Authentication Error:

Failed to authenticate to the chef server (http 401).

Server Response:

Failed to authenticate as ‘chef-validator’. Ensure that your node_name and client key are correct.

Relevant Config Settings:

chef_server_url "https://chef01.blah.com:443/organizations/blahinf"
validation_client_name "blah-validator"
validation_key “C:\chef\validation.pem”

If these settings are correct, your validation_key may be invalid.

[2015-11-24T08:23:22-08:00] ERROR: Running exception handlers
[2015-11-24T08:23:22-08:00] ERROR: Exception handlers complete
[2015-11-24T08:23:22-08:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2015-11-24T08:23:22-08:00] FATAL: Net::HTTPServerException: 401 “Unauthorized”

I have seen some posts on how to reset the validation key, however I am not use the gui just command line. How would I go about doing that?



Hi! If i recall correctly, I did this on Chef Server 11. I’m not sure how it’ll work on 12, but maybe it’ll help get you to your resolution. I’ll see if I can write up a new version for 12 in the near future.


Thanks for the information. I tried resetting the key but I am getting the following error

ERROR: The object you are looking for could not be found
Response: Cannot load client blah-validator

I am running the following command form a chef management windows workstation

knife client reregister blah-validator -f blah-validaton.pem

Any help is appreciated.



What version of the Chef Server are you using?


chef-server 12.2.0

I got it working, my knife.rb file was incorrect it was supposed to be

validation_client_name “blahinf-validator”

validation_client_name “blah-validator”