# 401 error while doing validatorless bootstrap

**URL:** <https://discourse.chef.io/t/401-error-while-doing-validatorless-bootstrap/12383>\
**Category:** Chef Infra (archive)\
**Created:** [January 3, 2018, 8:53am UTC](https://discourse.chef.io/t/401-error-while-doing-validatorless-bootstrap/12383 "2018-01-03T08:53:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akajain](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@akajain](https://discourse.chef.io/u/akajain)\
**Post date:** [January 3, 2018, 8:53am UTC](https://discourse.chef.io/t/401-error-while-doing-validatorless-bootstrap/12383/1 "2018-01-03T08:53:07Z")

</div>

I am trying validatorless bootstrap first time with chef client version 13.6.4.  
I am manualy trying to bootstrap using user data.

Here is my client.rb

> chef\_server\_url '[https://X.X.X.X/organizations/q73](https://X.X.X.X/organizations/q73)'  
> client\_key 'C:\chef\ops.pem'  
> node\_name 'chefwindows'  
> ssl\_verify\_mode :verify\_none

where node\_name is the hostname of the client VM. I keep getting the following error

> Starting Chef Client, version 13.6.4
> 
> # ================================================================================ Chef encountered an error attempting to load the node data for "chefwindows"
> 
> ## Authentication Error:
> 
> Failed to authenticate to the chef server (http 401).
> 
> ## Server Response:
> 
> Failed to authenticate as 'chefwindows'. Ensure that your node\_name and client key are correct.
> 
> ## Relevant Config Settings:
> 
> chef\_server\_url "[https://X.X.X.X/organizations/q73](https://X.X.X.X/organizations/q73)"  
> node\_name "chefwindows"  
> client\_key "C:\chef\ops.pem"
> 
> If these settings are correct, your client\_key may be invalid, or  
> you may have a chef user with the same client name as this node.
> 
> ## System Info:
> 
> chef\_version=13.6.4  
> ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]  
> program\_name=C:/opscode/chefdk/bin/chef-client  
> executable=C:/opscode/chefdk/bin/chef-client

However as I change node\_name to `ops` (same as client key name) it works. But this is not the way it should work I can have multiple chef client bootstrapped to the same chef server using the same client key. I am not sure what am I missing here.

---

<div class="post-metadata">

**Author:** ![majormoses](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/majormoses/32/1999_2.png) [@majormoses](https://discourse.chef.io/u/majormoses)\
**Post date:** [January 9, 2018, 6:20pm UTC](https://discourse.chef.io/t/401-error-while-doing-validatorless-bootstrap/12383/2 "2018-01-09T18:20:23Z")

</div>

Each client generates a key that can only be used by that client. What I think you want is called a validator which allows the node to connect to chef and allow the client specific keys to be generated. You will likely want to remove the validator key from the node as soon as you have bootstrapped.

The following links might be of value:

- [https://docs.chef.io/chef\_private\_keys.html](https://docs.chef.io/chef_private_keys.html)
- [https://github.com/chef-cookbooks/chef-client](https://github.com/chef-cookbooks/chef-client)
