Windows chef clients not registering with server

Hello experts,

I have been able to configure "knife " but I am unable to register a couple
of windows boxes that I am playing with in chef. I am running chef 0.10.4.
The chef-installer has been installed in c:\opscode\chef.

Home directory where chef-client is running
C:\Documents and Settings\user.ABC\chef-repo\

client.rb on both boxes is configured as -
log_level :info
log_location STDOUT
chef_server_url 'http://chef.internal.com:4000
validation_client_name 'chef-validator’
validation_key ‘C:\Documents and
Settings\user.ABC\chef-repo\validation.pem’

*
*
The error on the 1st box ( The first box also runs knife from
%HOMEPATH%/chef-repo/.chef) when I run chef-client -c client.rb
-K validation.pem or chef-client -c client.rb

[Sun, 27 Nov 2011 18:24:06 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000] INFO: Client key /etc/chef/client.pem is
not present - registering
[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #<Errno::ENOENT: No such file or directory - validation.pem>
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL:
Chef::Exceptions::PrivateKeyMissing: I cannot read validation.pem, which
you told me to use to sign requests!

On the 2nd box:
[Sun, 27 Nov 2011 18:40:37 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:40:51 +0000] INFO: Client key /etc/chef/client.pem is
not present - registering
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Errno::ENOENT: No such file or
directory - /etc/chef/client.pem

“knife client list” shows me that both these agents have been registered as
clients but they don’t register themselves as nodes.

Logs show:

INFO: Authenticating client chef-validator
INFO: Creating new key pair for node1.internal.com
INFO: Sending client(4ecf64a7-4ef9-4b8f-abb0-2e08fbe94a63) to the index
queue for addition.
~ Qrack::Queue#publish will be removed in Bunny 0.8. Use direct_exchange =
bunny.exchange(’’); direct_exchange.publish(‘message’, key: queue.name) if
you want to publish directly to one given queue. For more informations see
https://github.com/ruby-amqp/bunny/issues/15 and for more theoretical
explanation check http://bit.ly/nOF1CK
merb : chef-server (api) : worker (port 4000) ~ Started request handling:
Sun Nov 27 18:40:52 +0000 2011
merb : chef-server (api) : worker (port 4000) ~ Params: {“name”=>“
node1.internal.com”, “action”=>“create”, “admin”=>false,
“controller”=>“clients”}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.014587, :dispatch_time=>0.457,
:action_time=>0.455808, :after_filters_time=>2.2e-05}
merb : chef-server (api) : worker (port 4000) ~

Can you please point out what I am missing here ?
thanks
Ranjan

Forgot to add - These are on Win2003 servers and I have tried running chef
client with the complete path as recommended in the documentation.

chef-client -c "C:\Documents and Settings\user.ABC\chef-repo\client.rb"

On Mon, Nov 28, 2011 at 12:16 AM, Madhurranjan Mohaan <
maadhuuranjan.m@gmail.com> wrote:

Hello experts,

I have been able to configure "knife " but I am unable to register a
couple of windows boxes that I am playing with in chef. I am running chef
0.10.4. The chef-installer has been installed in c:\opscode\chef.

Home directory where chef-client is running
C:\Documents and Settings\user.ABC\chef-repo\

client.rb on both boxes is configured as -
log_level :info
log_location STDOUT
chef_server_url 'http://chef.internal.com:4000'
validation_client_name 'chef-validator'
validation_key 'C:\Documents and
Settings\user.ABC\chef-repo\validation.pem'

*
*
The error on the 1st box ( The first box also runs knife from
%HOMEPATH%/chef-repo/.chef) when I run chef-client -c client.rb
-K validation.pem or chef-client -c client.rb

[Sun, 27 Nov 2011 18:24:06 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000] INFO: Client key /etc/chef/client.pem is
not present - registering
[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #<Errno::ENOENT: No such file or directory - validation.pem>
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL:
Chef::Exceptions::PrivateKeyMissing: I cannot read validation.pem, which
you told me to use to sign requests!

On the 2nd box:
[Sun, 27 Nov 2011 18:40:37 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:40:51 +0000] INFO: Client key /etc/chef/client.pem is
not present - registering
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Errno::ENOENT: No such file or
directory - /etc/chef/client.pem

"knife client list" shows me that both these agents have been registered
as clients but they don't register themselves as nodes.

Logs show:

INFO: Authenticating client chef-validator
INFO: Creating new key pair for node1.internal.com
INFO: Sending client(4ecf64a7-4ef9-4b8f-abb0-2e08fbe94a63) to the index
queue for addition.
~ Qrack::Queue#publish will be removed in Bunny 0.8. Use direct_exchange =
bunny.exchange(''); direct_exchange.publish('message', key: queue.name)
if you want to publish directly to one given queue. For more informations
see https://github.com/ruby-amqp/bunny/issues/15 and for more theoretical
explanation check File: Ruby AMQP gem: Working with exchanges — Documentation for ruby-amqp/amqp (master)
merb : chef-server (api) : worker (port 4000) ~ Started request handling:
Sun Nov 27 18:40:52 +0000 2011
merb : chef-server (api) : worker (port 4000) ~ Params: {"name"=>"
node1.internal.com", "action"=>"create", "admin"=>false,
"controller"=>"clients"}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.014587, :dispatch_time=>0.457,
:action_time=>0.455808, :after_filters_time=>2.2e-05}
merb : chef-server (api) : worker (port 4000) ~

Can you please point out what I am missing here ?
thanks
Ranjan

its not able to read vaildation.pem, can you check if the validation cert
is present or not, or try to place to somewhere else and rerun chef,.
On Mon, Nov 28, 2011 at 12:25 AM, Madhurranjan Mohaan <
maadhuuranjan.m@gmail.com> wrote:

Forgot to add - These are on Win2003 servers and I have tried running
chef client with the complete path as recommended in the documentation.

chef-client -c "C:\Documents and Settings\user.ABC\chef-repo\client.rb"

On Mon, Nov 28, 2011 at 12:16 AM, Madhurranjan Mohaan <
maadhuuranjan.m@gmail.com> wrote:

Hello experts,

I have been able to configure "knife " but I am unable to register a
couple of windows boxes that I am playing with in chef. I am running chef
0.10.4. The chef-installer has been installed in c:\opscode\chef.

Home directory where chef-client is running
C:\Documents and Settings\user.ABC\chef-repo\

client.rb on both boxes is configured as -
log_level :info
log_location STDOUT
chef_server_url 'http://chef.internal.com:4000'
validation_client_name 'chef-validator'
validation_key 'C:\Documents and
Settings\user.ABC\chef-repo\validation.pem'

*
*
The error on the 1st box ( The first box also runs knife from
%HOMEPATH%/chef-repo/.chef) when I run chef-client -c client.rb
-K validation.pem or chef-client -c client.rb

[Sun, 27 Nov 2011 18:24:06 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000] INFO: Client key /etc/chef/client.pem
is not present - registering
[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #<Errno::ENOENT: No such file or directory - validation.pem>
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL:
Chef::Exceptions::PrivateKeyMissing: I cannot read validation.pem, which
you told me to use to sign requests!

On the 2nd box:
[Sun, 27 Nov 2011 18:40:37 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:40:51 +0000] INFO: Client key /etc/chef/client.pem
is not present - registering
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Errno::ENOENT: No such file or
directory - /etc/chef/client.pem

"knife client list" shows me that both these agents have been registered
as clients but they don't register themselves as nodes.

Logs show:

INFO: Authenticating client chef-validator
INFO: Creating new key pair for node1.internal.com
INFO: Sending client(4ecf64a7-4ef9-4b8f-abb0-2e08fbe94a63) to the index
queue for addition.
~ Qrack::Queue#publish will be removed in Bunny 0.8. Use direct_exchange
= bunny.exchange(''); direct_exchange.publish('message', key: queue.name)
if you want to publish directly to one given queue. For more informations
see https://github.com/ruby-amqp/bunny/issues/15 and for more
theoretical explanation check File: Ruby AMQP gem: Working with exchanges — Documentation for ruby-amqp/amqp (master)
merb : chef-server (api) : worker (port 4000) ~ Started request handling:
Sun Nov 27 18:40:52 +0000 2011
merb : chef-server (api) : worker (port 4000) ~ Params: {"name"=>"
node1.internal.com", "action"=>"create", "admin"=>false,
"controller"=>"clients"}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.014587, :dispatch_time=>0.457,
:action_time=>0.455808, :after_filters_time=>2.2e-05}
merb : chef-server (api) : worker (port 4000) ~

Can you please point out what I am missing here ?
thanks
Ranjan

Yes its present . Verified its the same one as is present on the chef
server.

On Mon, Nov 28, 2011 at 12:52 AM, Ranjib Dey ranjibd@thoughtworks.comwrote:

its not able to read vaildation.pem, can you check if the validation cert
is present or not, or try to place to somewhere else and rerun chef,.

On Mon, Nov 28, 2011 at 12:25 AM, Madhurranjan Mohaan <
maadhuuranjan.m@gmail.com> wrote:

Forgot to add - These are on Win2003 servers and I have tried running
chef client with the complete path as recommended in the documentation.

chef-client -c "C:\Documents and Settings\user.ABC\chef-repo\client.rb"

On Mon, Nov 28, 2011 at 12:16 AM, Madhurranjan Mohaan <
maadhuuranjan.m@gmail.com> wrote:

Hello experts,

I have been able to configure "knife " but I am unable to register a
couple of windows boxes that I am playing with in chef. I am running chef
0.10.4. The chef-installer has been installed in c:\opscode\chef.

Home directory where chef-client is running
C:\Documents and Settings\user.ABC\chef-repo\

client.rb on both boxes is configured as -
log_level :info
log_location STDOUT
chef_server_url 'http://chef.internal.com:4000'
validation_client_name 'chef-validator'
validation_key 'C:\Documents and
Settings\user.ABC\chef-repo\validation.pem'

*
*
The error on the 1st box ( The first box also runs knife from
%HOMEPATH%/chef-repo/.chef) when I run chef-client -c client.rb
-K validation.pem or chef-client -c client.rb

[Sun, 27 Nov 2011 18:24:06 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000] INFO: Client key /etc/chef/client.pem
is not present - registering
[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #<Errno::ENOENT: No such file or directory - validation.pem>
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL:
Chef::Exceptions::PrivateKeyMissing: I cannot read validation.pem, which
you told me to use to sign requests!

On the 2nd box:
[Sun, 27 Nov 2011 18:40:37 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:40:51 +0000] INFO: Client key /etc/chef/client.pem
is not present - registering
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:40:53 +0000] FATAL: Errno::ENOENT: No such file or
directory - /etc/chef/client.pem

"knife client list" shows me that both these agents have been registered
as clients but they don't register themselves as nodes.

Logs show:

INFO: Authenticating client chef-validator
INFO: Creating new key pair for node1.internal.com
INFO: Sending client(4ecf64a7-4ef9-4b8f-abb0-2e08fbe94a63) to the index
queue for addition.
~ Qrack::Queue#publish will be removed in Bunny 0.8. Use direct_exchange
= bunny.exchange(''); direct_exchange.publish('message', key: queue.name)
if you want to publish directly to one given queue. For more informations
see https://github.com/ruby-amqp/bunny/issues/15 and for more
theoretical explanation check File: Ruby AMQP gem: Working with exchanges — Documentation for ruby-amqp/amqp (master)
merb : chef-server (api) : worker (port 4000) ~ Started request
handling: Sun Nov 27 18:40:52 +0000 2011
merb : chef-server (api) : worker (port 4000) ~ Params: {"name"=>"
node1.internal.com", "action"=>"create", "admin"=>false,
"controller"=>"clients"}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.014587, :dispatch_time=>0.457,
:action_time=>0.455808, :after_filters_time=>2.2e-05}
merb : chef-server (api) : worker (port 4000) ~

Can you please point out what I am missing here ?
thanks
Ranjan

Did you try to use / instead of ? My client.rb on windows is written
like d:/chef/validation.pem and I run it using chef_client -c
d:/chef/client.rb.

You may also wish to set(replacing the path)

client_key "d:/chef/client.pem"

into your client.rb to be sure your
client go read the config file (the message telling it can't find
client.pem should show you the configured path (the fact it try to find
it in /etc/chef is a clue, Windows won't be able to write into /etc/chef
as it don't know this path)

On Mon, 28 Nov 2011 12:50:50 +0530,
Madhurranjan Mohaan wrote:

Yes its present . Verified its the same
one as is present on the chef server.

On Mon, Nov 28, 2011 at 12:52 AM,
Ranjib Dey wrote:
its not able to read vaildation.pem, can you check
if the validation cert is present or not, or try to place to somewhere
else and rerun chef,.

On Mon, Nov 28, 2011 at 12:25 AM, Madhurranjan
Mohaan wrote:
Forgot to add - These are on Win2003 servers and I have
tried running chef client with the complete path as recommended in the
documentation.

chef-client -c "C:Documents and
Settingsuser.ABCchef-repoclient.rb"

On Mon, Nov 28, 2011 at 12:16 AM,
Madhurranjan Mohaan wrote:
Hello experts,

I have been able to
configure "knife " but I am unable to register a couple of windows boxes
that I am playing with in chef. I am running chef 0.10.4. The
chef-installer has been installed in c:opscodechef.

Home directory
where chef-client is running
C:Documents and Settingsuser.ABCchef-repo

CLIENT.RB on both boxes is configured as -

log_level :info

log_location STDOUT
chef_server_url 'http://chef.internal.com:4000
[4]'

validation_client_name 'chef-validator'
validation_key
'C:Documents and Settingsuser.ABCchef-repovalidation.pem'

The error
on the 1st box ( The first box also runs knife from
%HOMEPATH%/chef-repo/.chef) when I run chef-client -c client.rb -K
validation.pem or chef-client -c client.rb

[Sun, 27 Nov 2011 18:24:06
+0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000]
INFO: Client key /etc/chef/client.pem is not present - registering

[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #
[Sun, 27 Nov 2011 18:24:21 +0000] FATAL: Stacktrace
dumped to C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011
18:24:21 +0000] FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot
read validation.pem, which you told me to use to sign requests!

On
the 2nd box:

[Sun, 27 Nov 2011 18:40:37 +0000] INFO: *** Chef 0.10.4


[Sun, 27 Nov 2011 18:40:51 +0000] INFO: Client key
/etc/chef/client.pem is not present - registering
[Sun, 27 Nov 2011
18:40:53 +0000] FATAL: Stacktrace dumped to
C:/var/chef/cache/chef-stacktrace.out
[Sun, 27 Nov 2011 18:40:53 +0000]
FATAL: Errno::ENOENT: No such file or directory - /etc/chef/client.pem

"knife client list" shows me that both these agents have been
registered as clients but they don't register themselves as nodes.

Logs show:

INFO: Authenticating client chef-validator
INFO:
Creating new key pair for node1.internal.com [5]
INFO: Sending
client(4ecf64a7-4ef9-4b8f-abb0-2e08fbe94a63) to the index queue for
addition.
~ Qrack::Queue#publish will be removed in Bunny 0.8. Use
direct_exchange = bunny.exchange(''); direct_exchange.publish('message',
key: queue.name [6]) if you want to publish directly to one given queue.
For more informations see https://github.com/ruby-amqp/bunny/issues/15
[7] and for more theoretical explanation check File: Ruby AMQP gem: Working with exchanges — Documentation for ruby-amqp/amqp (master) [8]

merb : chef-server (api) : worker (port 4000) ~ Started request
handling: Sun Nov 27 18:40:52 +0000 2011
merb : chef-server (api) :
worker (port 4000) ~ Params: {"name"=>"node1.internal.com [9]",
"action"=>"create", "admin"=>false, "controller"=>"clients"}
merb :
chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.014587, :dispatch_time=>0.457,
:action_time=>0.455808, :after_filters_time=>2.2e-05}
merb :
chef-server (api) : worker (port 4000) ~

Can you please point out
what I am missing here ?
thanks
Ranjan

Links:

[1] mailto:ranjibd@thoughtworks.com
[2]
mailto:maadhuuranjan.m@gmail.com
[3]
mailto:maadhuuranjan.m@gmail.com
[4] http://chef.internal.com:4000
[5]
http://node1.internal.com
[6] http://queue.name
[7]
https://github.com/ruby-amqp/bunny/issues/15
[8]
File: Ruby AMQP gem: Working with exchanges — Documentation for ruby-amqp/amqp (master)
[9] http://node1.internal.com

On Nov 27, 2011 10:46 AM, "Madhurranjan Mohaan" maadhuuranjan.m@gmail.com
wrote:

validation_key 'C:\Documents and
Settings\user.ABC\chef-repo\validation.pem'

[Sun, 27 Nov 2011 18:24:06 +0000] INFO: *** Chef 0.10.4 ***
[Sun, 27 Nov 2011 18:24:21 +0000] INFO: Client key /etc/chef/client.pem
is not present - registering
[Sun, 27 Nov 2011 18:24:21 +0000] WARN: Failed to read the private key
validation.pem: #<Errno::ENOENT: No such file or directory - validation.pem

Try moving the validation key to a location that doesn't have spaces in the
file name, like 'c:/opscode/chef'

Also, you will probably need to specify the 'client_key' configuration
value so it is created in a Windows compatible location, like
'c:/opscode/chef/client.pem'

I believe 0.10.6 will have a couple improvements on the Windows default
file locations, but I don't have internet access as I write this to look up
the ticket numbers.

Bryan