I’ve been playing around with Chef again this afternoon, and ran into a problem after following the (very useful) Opscode tutorials and then experimenting on my own
localhost ============================================================== localhost localhost Chef encountered an error attempting to create the client "vagrant.vm" localhost localhost ============================================================== localhost localhost localhost localhost localhost Authorization Error: localhost localhost -------------------- localhost localhost Your validation client is not authorized to create the client for this node (HTTP 403). localhost localhost localhost localhost localhost localhost localhost Possible Causes: localhost localhost ---------------- localhost localhost * There may already be a client named "vagrant.vm" localhost localhost * Your validation client (xxxxxx-validator) may have misconfigured authorization permissions. localhost
It’s quite obvious that my earlier tutorial-based activities had registered the ‘vagrant.vm’ node name with my hosted Chef. Accordingly I visited my Hosted Chef portal and removed the node, but after receiving confirmation of the node being deleted I was still getting the same error when attempting to provision my local vm box.
Give the second Vagrant node a new name when bootstrapping e.g.
$ knife bootstrap localhost \ --ssh-user vagrant \ --ssh-password vagrant \ --ssh-port 2222 \ --run-list "recipe[apt]" \ --sudo \ --node-name "vagrant.vm2"
Alternatively you can delete the first node you created via knife on the CLI (rather than attempting to delete the node via the web-based Hosted Chef interface):
$ knife node delete "vagrant.vm"