Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chef Error while bootstrapping. Authorization Error: (HTTP 403)

Tags:

chef-infra

I recreated a node with the same name. I've run into this error setting up a node and bootstrapping it:

 Starting Chef Client, version 11.16.4
 [2014-11-24T18:51:13+00:00] INFO: *** Chef 11.16.4 ***
 [2014-11-24T18:51:13+00:00] INFO: Chef-client pid: 4540
 Creating a new client identity for node1 using the validator key.
 [2014-11-24T18:51:15+00:00] INFO: Client key /etc/chef/client.pem is not present - registering
 [2014-11-24T18:51:16+00:00] INFO: HTTP Request Returned 409 Conflict: Client already exists
 [2014-11-24T18:51:16+00:00] INFO: HTTP Request Returned 403 Forbidden: error

 ================================================================================
 Chef encountered an error attempting to create the client "node1"
 ================================================================================


 Authorization Error:
 --------------------
 Your validation client is not authorized to create the client for this node (HTTP 403).



 Possible Causes:
 ----------------
 * There may already be a client named "node1"

 * Your validation client (chef-validator) may have misconfigured authorization permissions.
like image 257
Shivam Bajpai Avatar asked Nov 24 '14 18:11

Shivam Bajpai


1 Answers

In this situation I did not delete the client. The node was recreated with the same name so the node and client both needed to be deleted. Here are the commands to do so.

knife node delete <node-name>
knife client delete <node-name>

In the above situation it must be:

knife node delete node1
knife client delete node1
like image 175
Shivam Bajpai Avatar answered Oct 12 '22 23:10

Shivam Bajpai