OpenSSL::PKey::RSAError: private key needed

Hi All,

I am trying to setup my server and client. I have am running into this error and I am not sure how to resolve ?

[xr-vm_node0_RSP0_CPU0:/etc/chef]$chef-client --once -j /etc/chef/init.json
[2016-03-25T15:15:04-07:00] INFO: Forking chef instance to converge…
Starting Chef Client, version 12.4.1
[2016-03-25T15:15:04-07:00] INFO: *** Chef 12.4.1 ***
[2016-03-25T15:15:04-07:00] INFO: Chef-client pid: 16424

=====================================================================
Chef encountered an error attempting to load the node data for “xr-vm_node0_RSP0_CPU0”

Unexpected Error:

OpenSSL::PKey::RSAError: private key needed.

Running handlers:
[2016-03-25T15:17:25-07:00] ERROR: Running exception handlers
Running handlers complete
[2016-03-25T15:17:25-07:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 141.459468123 seconds
[2016-03-25T15:17:25-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-03-25T15:17:25-07:00] ERROR: private key needed.
[2016-03-25T15:17:25-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

=====================================
output of : chef-stacktrace.out

/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-authentication-1.3.0/lib/mixlib/authentication/signedheaderauth.rb:94:in_encrypt’e
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-authentication-1.3.0/lib/mixlib/authentication/signedheaderauth.rb:94:in sign' /opt/chef/embedded/apps/chef/lib/chef/http/auth_credentials.rb:51:insignature_headers’
/opt/chef/embedded/apps/chef/lib/chef/http/authenticator.rb:96:in authentication_headers' /opt/chef/embedded/apps/chef/lib/chef/http/authenticator.rb:50:inhandle_request’
/opt/chef/embedded/apps/chef/lib/chef/http.rb:226:in block in apply_request_middleware' /opt/chef/embedded/apps/chef/lib/chef/http.rb:224:ineach’
/opt/chef/embedded/apps/chef/lib/chef/http.rb:224:in inject' /opt/chef/embedded/apps/chef/lib/chef/http.rb:224:inapply_request_middleware’
/opt/chef/embedded/apps/chef/lib/chef/http.rb:141:in request' /opt/chef/embedded/apps/chef/lib/chef/rest.rb:120:inget’
/opt/chef/embedded/apps/chef/lib/chef/node.rb:518:in load' /opt/chef/embedded/apps/chef/lib/chef/node.rb:502:infind_or_create’
/opt/chef/embedded/apps/chef/lib/chef/policy_builder/expand_node_object.rb:106:in load_node' /opt/chef/embedded/apps/chef/lib/chef/client.rb:443:inload_node’
/opt/chef/embedded/apps/chef/lib/chef/client.rb:255:in run' /opt/chef/embedded/apps/chef/lib/chef/application.rb:270:inblock in fork_chef_client’
/opt/chef/embedded/apps/chef/lib/chef/application.rb:258:in fork' /opt/chef/embedded/apps/chef/lib/chef/application.rb:258:infork_chef_client’
/opt/chef/embedded/apps/chef/lib/chef/application.rb:224:in block in run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:39:inwith_server_connectivity’
/opt/chef/embedded/apps/chef/lib/chef/application.rb:212:in run_chef_client' /opt/chef/embedded/apps/chef/lib/chef/application/client.rb:375:inrun_application’
/opt/chef/embedded/apps/chef/lib/chef/application.rb:60:in run' /opt/chef/embedded/apps/chef/bin/chef-client:26:in<top (required)>’
/usr/bin/chef-client:55:in `load’

Are you sure you have a private key and not a public key or some other
content in your client key file?

I just saw this error the other day when a public key was used in the key
file.

how to resolve this ? im not sure how to get the private key to the correct file ?