I am testing multiple cookbooks and with each cookbook I am bootstrapping my node repeatedly (only for testing purpose).
When I run chef-client on my node, I get below error:
***************************************
[2017-04-17T20:13:20-07:00] WARN: Failed to read the private key /etc/chef/client.pem: #<Errno::EACCES: Permission denied @ rb_sysopen - /etc/chef/client.pem>
================================================================================
Chef encountered an error attempting to create the client "XXXX.com"
================================================================================
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"
Platform:
---------
x86_64-linux
****************************************
I am using validatorless bootstrap (--bootstrap-vault-json). Can someone let me know why I am getting this error. I remember that i was able to run "chef-client" during initial bootstrapping.