client.pem and failure to authenticate

2,113 views
Skip to first unread message

Jay Perry

unread,
Apr 10, 2012, 5:27:06 PM4/10/12
to vagra...@googlegroups.com
At what point during the provision phase is the client.pem created on the vagrant box?  I have a failure:

[Tue, 10 Apr 2012 23:13:07 +0200] INFO: Client key /etc/chef/client.pem is not present - registering
[Tue, 10 Apr 2012 23:13:07 +0200] INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate as test-validator. Ensure that your node_name and client key are correct.

When I go on to the box I don't see a /etc/chef/client.pem file created.

I have this working with another chef organization and after the box is provisioned I see there is a /etc/chef/client.pem file.  Can someone guide me or maybe tell me what is going wrong here.  The validator key file is correct too.

Thanks,
Jay

Lorin Hochstein

unread,
Apr 11, 2012, 9:54:41 AM4/11/12
to vagra...@googlegroups.com
Hi Jerry:

Are you using Opscode's Hosted Chef service, or are you running your own Chef server?

I don't know if this is the rpoblem, but the line "Failed to authenticate as test-validator." suggests to me that you might have chef.validation_client_name set as "test-validator" in your Vagrantfile. If you're running your own Chef server, this should be set to "chef-validator".

Take care,

Lorin

Jay Perry

unread,
Apr 11, 2012, 10:10:18 AM4/11/12
to vagra...@googlegroups.com
Hi Loren,

It turns out someone gave me the wrong validator key so that was causing the 401.

Thanks,
Jay


On Tuesday, April 10, 2012 5:27:06 PM UTC-4, Jay Perry wrote:
Reply all
Reply to author
Forward
0 new messages