- From: <
>
- To:
- Subject: [chef] Vagrant and Chef client and server
- Date: Wed, 16 Jan 2013 10:10:02 -0800 (PST)
We have just started working with Chef and are still trying to figure it out.
We have successfully used Vagrant to created both a Chef server VM and a Chef
client VM that connects to the server. We used Vagrantfiles that we found on
the web that use the chef-server and chef-client cookbooks.
However, the client creation and connection to the server only works if the
client's node does not exist on the server - if chef-client can create the
node
on the server it works fine. But, we would like to create the node on the
server first, and populate a run list for it, before creating the VM with
Vagrant. The error I get when I try it is appended.
Does anyone know how to fix this?
Is there a better way to do it? By maybe doing less with vagrant and then
using
"knife bootstrap"?
Thanks,
Jim
[2013-01-15T22:20:08+00:00] INFO: *** Chef 10.14.2 ***
[2013-01-15T22:20:08+00:00] INFO: Client key /etc/chef/client.pem is not
present - registering
[2013-01-15T22:20:08+00:00] INFO: HTTP Request Returned 409 Conflict: Client
already exists
[2013-01-15T22:20:08+00:00] INFO: HTTP Request Returned 403 Forbidden: You are
not allowed to take this action.
================================================================================
Chef encountered an error attempting to create the client "chefClient1"
================================================================================
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 "chefClient1"
* Your validation client (chef-validator) may have misconfigured authorization
permissions.
[2013-01-15T22:20:08+00:00] FATAL: Stacktrace dumped to
/srv/chef/file_store/chef-stacktrace.out
[2013-01-15T22:20:08+00:00] FATAL: Net::HTTPServerException: 403 "Forbidden"
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chef-client -c /tmp/vagrant-chef-1/client.rb -j /tmp/vagrant-chef-1/dna.json
- [chef] Vagrant and Chef client and server, james.fluke, 01/16/2013
Archive powered by MHonArc 2.6.16.