Troubles with chef client registration

Greetings anyone.

I’m completely new here. Let me introduce myself. My name is Dmitry and
I’m going to use Chef to manage a web hosting server and several linux
workstations.

Till now I’ve been experimenting with it in VirtualBox. I did a manual
server installation as described at
http://wiki.opscode.com/display/chef/Manual+Chef+Server+Configuration

And I’ve bootstrapped a test client on a separate guest os, following
http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation

Now then I run a client, I get the following error on chef-server:

merb : worker (port 4000) ~ Started request handling: Tue May 11
00:47:21 +0400 2010
merb : worker (port 4000) ~ No routes match the request: /registrations

  • (Merb::ControllerExceptions::NotFound)
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/router.rb:143:in
    route_for' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/request.rb:116:infind_route!’
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/dispatcher.rb:56:in
    handle' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/dispatcher.rb:36:inhandle’
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/application.rb:17:in
    call' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/middleware/static.rb:28:incall’
    /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:76:in
    pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:incatch’
    /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:in
    pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:57:inprocess’
    /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:42:in
    receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun_machine’
    /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
    run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/backends/base.rb:57:instart’
    /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/server.rb:156:in start' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/thin.rb:30:instart_server’
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/abstract.rb:296:in
    start_at_port' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/abstract.rb:128:instart’
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/server.rb:174:in
    bootup' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/server.rb:42:instart’
    /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core.rb:173:in start' /usr/lib/ruby/gems/1.8/gems/chef-server-0.8.16/bin/chef-server:77 /usr/bin/chef-server:19:inload’
    /usr/bin/chef-server:19
    merb : worker (port 4000) ~ Params: {“id”=>“chef-client-test_localhost”,
    “validation_token”=>nil,
    “password”=>“gewutvlkfHUSYdrsj2vM1T7ddijVaQHVZkLDrjPjaTFwbHCIyJmSTvKUCSFAIbeHTnvUeQazxlWoSnyZ5QudKp5RkZhx6Atw0o88ZsBzFkSyLUzPAWF5HbJOLbguXOn0S3SuSmFCJBxGQoTp0X3gRDXk80QSJWrEe6L4oKNoHYHaxmaRpghMIEaFMieAZupHxcSBXhBTtCydGzxHvyhkOEGrwsuZhSy3NDaidYcqiN70QOBgsZ8BXR2Ud6DIKG1KclwI3RkJgc5cIv7alhUc74oN2PDDzhf134TV4Cd1fZW3TY5vTMvjbKJQ6D2qJbU7wCJxDhLZF2tXE8zrhwuL7Lomde0YXyUFjkm0F0yxg52F4nsD6IA5aV8HgQhD8wnqJcC7hYJZOG0NpTQQUW2kxHLYhG1lfju36XUxXm4a4ficmISNRAmsXpmnGEvIFd3zVUCGT8TI36i06dVfQGDwrYX4yALO8RY15Rwu3bntI7C8OqhYKLCC”}
    merb : worker (port 4000) ~

On a client it looks like this:

maus@chef-client-test:/usr$ sudo chef-client -l debug
/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 404 "Not Found" (Net::HTTPServerException) from /usr/lib/ruby/1.8/chef/rest.rb:233:inrun_request’
from /usr/lib/ruby/1.8/chef/rest.rb:95:in post_rest' from /usr/lib/ruby/1.8/chef/client.rb:221:increate_registration’
from /usr/lib/ruby/1.8/chef/client.rb:199:in register' from /usr/lib/ruby/1.8/chef/client.rb:73:inrun’
from /usr/lib/ruby/1.8/chef/application/client.rb:186:in
run_application' from /usr/lib/ruby/1.8/chef/application/client.rb:178:inloop’
from /usr/lib/ruby/1.8/chef/application/client.rb:178:in
run_application' from /usr/lib/ruby/1.8/chef/application.rb:57:inrun’
from /usr/bin/chef-client:25

I updated all the gems on both hosts, now they’re at 0.8.16 version, but
the problem is still there.

I guess I did some trivial error, but I have no ideas where is it.

Can someone give any hints?

Looks like on the client you're running chef from an outdated apt
package. This is easy to do on debian in particular.

Can you confirm that chef-client -v does say Chef 0.8.16?

You can also take a look at gem env | grep EXECUTABLE DIRECTORY and
make sure this is first in your PATH.

HTH,
Dan DeLeo

On Wed, May 12, 2010 at 1:58 AM, Dmitry V'yal akamaus@gmail.com wrote:

Greetings anyone.

I'm completely new here. Let me introduce myself. My name is Dmitry and I'm
going to use Chef to manage a web hosting server and several linux
workstations.

Till now I've been experimenting with it in VirtualBox. I did a manual
server installation as described at
http://wiki.opscode.com/display/chef/Manual+Chef+Server+Configuration

And I've bootstrapped a test client on a separate guest os, following
http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation

Now then I run a client, I get the following error on chef-server:

merb : worker (port 4000) ~ Started request handling: Tue May 11 00:47:21
+0400 2010
merb : worker (port 4000) ~ No routes match the request: /registrations -
(Merb::ControllerExceptions::NotFound)
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/router.rb:143:in
route_for' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/request.rb:116:in find_route!'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/dispatcher.rb:56:in
handle' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/dispatch/dispatcher.rb:36:in handle'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/application.rb:17:in
call' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/middleware/static.rb:28:in call'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:76:in
pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:in catch'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:74:in
pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:57:in process'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/connection.rb:42:in
receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine'
/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in start'
/usr/lib/ruby/gems/1.8/gems/thin-1.2.7/lib/thin/server.rb:156:in start' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/thin.rb:30:in start_server'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/abstract.rb:296:in
start_at_port' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/rack/adapter/abstract.rb:128:in start'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/server.rb:174:in
bootup' /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core/server.rb:42:in start'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.15/lib/merb-core.rb:173:in start' /usr/lib/ruby/gems/1.8/gems/chef-server-0.8.16/bin/chef-server:77 /usr/bin/chef-server:19:in load'
/usr/bin/chef-server:19
merb : worker (port 4000) ~ Params: {"id"=>"chef-client-test_localhost",
"validation_token"=>nil,
"password"=>"gewutvlkfHUSYdrsj2vM1T7ddijVaQHVZkLDrjPjaTFwbHCIyJmSTvKUCSFAIbeHTnvUeQazxlWoSnyZ5QudKp5RkZhx6Atw0o88ZsBzFkSyLUzPAWF5HbJOLbguXOn0S3SuSmFCJBxGQoTp0X3gRDXk80QSJWrEe6L4oKNoHYHaxmaRpghMIEaFMieAZupHxcSBXhBTtCydGzxHvyhkOEGrwsuZhSy3NDaidYcqiN70QOBgsZ8BXR2Ud6DIKG1KclwI3RkJgc5cIv7alhUc74oN2PDDzhf134TV4Cd1fZW3TY5vTMvjbKJQ6D2qJbU7wCJxDhLZF2tXE8zrhwuL7Lomde0YXyUFjkm0F0yxg52F4nsD6IA5aV8HgQhD8wnqJcC7hYJZOG0NpTQQUW2kxHLYhG1lfju36XUxXm4a4ficmISNRAmsXpmnGEvIFd3zVUCGT8TI36i06dVfQGDwrYX4yALO8RY15Rwu3bntI7C8OqhYKLCC"}
merb : worker (port 4000) ~

On a client it looks like this:

maus@chef-client-test:/usr$ sudo chef-client -l debug
/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 404 "Not Found" (Net::HTTPServerException) from /usr/lib/ruby/1.8/chef/rest.rb:233:in run_request'
from /usr/lib/ruby/1.8/chef/rest.rb:95:in post_rest' from /usr/lib/ruby/1.8/chef/client.rb:221:in create_registration'
from /usr/lib/ruby/1.8/chef/client.rb:199:in register' from /usr/lib/ruby/1.8/chef/client.rb:73:in run'
from /usr/lib/ruby/1.8/chef/application/client.rb:186:in
run_application' from /usr/lib/ruby/1.8/chef/application/client.rb:178:in loop'
from /usr/lib/ruby/1.8/chef/application/client.rb:178:in
run_application' from /usr/lib/ruby/1.8/chef/application.rb:57:in run'
from /usr/bin/chef-client:25

I updated all the gems on both hosts, now they're at 0.8.16 version, but the
problem is still there.

I guess I did some trivial error, but I have no ideas where is it.

Can someone give any hints?