Hi.
Let me start by saying: I'm new to chef :) . Now I'm getting this error, which I can't figure out :( .
Here is what I have done:
I used vagrant to create a new VM locally:and knife boostrap to initialize itcat Vagrantfile
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :hostonly, "33.33.33.20"
config.vm.share_folder "v-root", "/vagrant", ".", :nfs => true
config.ssh.forward_agent = true
#config.vm.boot_mode = :gui
config.vm.forward_port 80, 8080endWe have a base role in our company that installs the correct ruby version and a chef-client.knife bootstrap 127.0.0.1 -p 2222 -E development-waldemarschwan -d adcloud -r "role[base]" --sudo -x vagrant -N platform-dev -i /Users/velrok/.vagrant.d/insecure_private_key
Up to this point everything is fine.
But when I connect to the instance via vagrant ssh and call chef-client I get the following error:
As far as I know it should not try to load any validation.pem.:~$ chef-client
[2012-11-12T14:05:13+00:00] INFO: *** Chef 10.14.4 ***
[2012-11-12T14:05:13+00:00] WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::EACCES: Permission denied - /etc/chef/client.pem>
================================================================================
Chef encountered an error attempting to create the client "platform-dev-1352727376"
================================================================================
Private Key Not Found:
----------------------
Your private key could not be loaded. If the key file exists, ensure that it is
readable by chef-client.
Relevant Config Settings:
-------------------------
validation_key "/etc/chef/validation.pem"
/var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/file_cache.rb:56:in `initialize': Permission denied - /var/cache/chef/chef-stacktrace.out (Errno::EACCES)
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/file_cache.rb:56:in `open'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/file_cache.rb:56:in `store'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application.rb:144:in `debug_stacktrace'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:314:in `rescue in block in run_application'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:271:in `block in run_application'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:270:in `loop'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application/client.rb:270:in `run_application'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/lib/chef/application.rb:70:in `run'
from /var/lib/gems/1.9.1/gems/chef-10.14.4/bin/chef-client:26:in `<top (required)>'
from /usr/local/bin/chef-client:23:in `load'from /usr/local/bin/chef-client:23:in `<main>'
Any thoughts / suggestions?
Any help is very much appreciated.
Best regards
Waldemar
-------------------------------------------------------------------------------------------------------
Waldemar Schwan · Software Engineer
Adcloud GmbH · Venloer Str. 25 · D-50672 Köln
Ein Unternehmen von Deutsche Post DHL
T +49 221 292 095 15 · F +49 221 292 095 99
" style="color:rgb(0,106,227)" target="_blank"> · www.adcloud.com
Handelsregister: Amtsgericht Köln, HRB 65770 · Sitz der Gesellschaft:
Köln · Geschäftsführer: Henning Lange, Oliver Thylmann
Archive powered by MHonArc 2.6.16.