Reputation: 173
I've an environment where the chef version is:
Chef Development Kit Version: 0.18.30
When I run the chef-client command, I get the following error:
root@localhost product]# chef-client
[2017-11-06T15:38:25-05:00] WARN: *****************************************
[2017-11-06T15:38:25-05:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2017-11-06T15:38:25-05:00] WARN: *****************************************
Starting Chef Client, version 12.14.89
Creating a new client identity for localhost using the validator key.
================================================================================
Chef encountered an error attempting to create the client "localhost"
================================================================================
Platform:
---------
x86_64-linux
Running handlers:
[2017-11-06T15:38:32-05:00] ERROR: Running exception handlers
Running handlers complete
[2017-11-06T15:38:32-05:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 07 seconds
[2017-11-06T15:38:32-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-11-06T15:38:32-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-11-06T15:38:32-05:00] ERROR: I can't write your private key to /etc/chef/client.pem - check permissions?
[2017-11-06T15:38:32-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
I'm new to chef. I cannot upgrade or change versions in this environment but a build is failing because of this issue. Any insights on why this is happening? Thanks.
Upvotes: 1
Views: 1520
Reputation: 54267
You are trying to run chef-client
on a machine that has not been boostrapped, meaning it doesn't have the authentication keys to access the Chef server or a config file with the info on where that Chef Server is. You can use knife bootstrap
normally, but check with others at your company (or whatever) as to what you usually use, might be something else.
Upvotes: 1