[chef] Re: Question about new client registration for VM


Chronological Thread 
  • From: Dreamcat4 < >
  • To:
  • Subject: [chef] Re: Question about new client registration for VM
  • Date: Sun, 14 Nov 2010 15:25:56 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=GL7pKRA/uNTXBTDL2CzRRffSQxBY3Ce8fS2Zc171SxupAIaibe63z61RrU0SrG+/5Y 97mH5I7wfJ1fyaJKgljr3gIR/6gvmV547nrch4ZAvH62ANtO9nf29WwwcuQk8PN2fB+6 Pv/UhVkkeYuQDZxEIGPdjj5i00zBhjYDG8YJ4=

On Thu, Nov 11, 2010 at 12:14 PM, Dreamcat4 
< >
 wrote:
> Hi!
>
> I'm trying to register a Virtual Machine as new node. As we know -
> chef-client sends up the validation.pem to download a new client.pem
> file and register itself as a new node...
>
> An error occurs at the point where the client is expecting to receive
> its new client.pem file from the server:
>
> "/var/lib/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/rest.rb:80:in
> `register': The response from the server did not include a private
> key! (Chef::Exceptions::CannotWritePrivateKey)"
>
> Full log:
> https://gist.github.com/669039
>

Well...
It turns out this message was the outcome after opscode servers had
returned back to chef-client a 301 redirect error.

janitors-Mac-mini:vagrant-node id$ curl --data-ascii "" --post301
api.opscode.com:80/organizations/dreamcat4/clients
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.8.33</center>
</body>
</html>


Initially it was difficult to find any reason for this. But just
looked in the client.rb file...

It says:
chef_server_url    "http://api.opscode.com/organizations/dreamcat4";

But it should have been:
chef_server_url    "https://api.opscode.com/organizations/dreamcat4";

So that was the reason for getting back a 301 redirect from nginx. Phew!

Very pleased to say new node registration is all working fine now.

>
>
> Regards
>
> dreamcat4
> 
>



Archive powered by MHonArc 2.6.16.

§