Chef::Exceptions::PrivateKeyMissing #329

Closed
gflarity opened this Issue Dec 10, 2013 · 6 comments

Projects

None yet

3 participants

@gflarity

We have some cookbooks we use to deployment vagrant VMs and less frequently production vms. We've got it all setup so that knife-solo 0.2.0 does this all quite well. However I'm looking to start using knife-solo 0.4.1 to do this instead. But I keep running into:

FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/client.pem

I ran knife solo init ., and then prepare, and then cook. It seems to uploaded the cookbooks properly... but now what? I'll attach the instructions we're using below that work with knife 0.2.0 below.

Thanks!

knife solo prepare root@ --omnibus-version "10.14.2"
ssh root@
sudoedit /etc/hostname
give it as connent (for example "avidtap.com")
sudoedit /etc/hosts
append ", " after the entry for 127.0.1.1
sudo service hostname start
sudo chmod 777 /tmp
log out ssh
knife solo cook -N <node_json> root@

Collaborator

Hi @gflarity,

that means that the chef run is trying to make an API call to chef server. Normally that is triggered by search or node.save. If you upgraded from Chef 10 to 11, you need to add "recipe[chef-solo-search]" to run_list, even it's bundled in knife-solo.

Running the knife command with -VV option gives you debug output. Gist/paste that if the previous didn't help.

Collaborator

@gflarity were you able to resolve this?

Unfortunately we haven't had time to try this. Thank you for the quick
response though. Eventually we'll need to update our deployment and I'll
dig this up.
On Dec 13, 2013 6:54 AM, "Teemu Matilainen" notifications@github.com
wrote:

@gflarity https://github.com/gflarity were you able to resolve this?


Reply to this email directly or view it on GitHubhttps://github.com/matschaffer/knife-solo/issues/329#issuecomment-30504326
.

@tmatilai Shouldn't that cookbook be included by default when running knife solo init (or integrated into knife solo). I just stumbled upon this error myself.

Collaborator
tmatilai commented Feb 1, 2014

@fullofcaffeine yes, in my opinion it should be included automatically to the run_list in Chef 11. There's even an issue for it: #255 (related to #232). But unfortunately I haven't found lately enough motivation to improve knife-solo, especially as I'm currently using knife-solo very seldom and the current version is working good enough for my use cases. But I promise to guide, review and test if someone wants to give it a try.

Collaborator
tmatilai commented Feb 1, 2014

I'll close this as I believe it's duplicate of #255.

@tmatilai tmatilai closed this Feb 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment