[chef] Re: Problem starting chef-client in Getting Started with EC2 Rails Infrastructure


Chronological Thread 
  • From: Arjuna Christensen <aj@opscode.com>
  • To: chef@lists.opscode.com
  • Subject: [chef] Re: Problem starting chef-client in Getting Started with EC2 Rails Infrastructure
  • Date: Tue, 14 Jul 2009 20:44:44 +1200

Hiya!

On 14/07/2009, at 8:31 PM, Robert J Berger wrote:

I think I followed all the instructions between Getting Started with EC2 Rails Infrastructure and Chef 0.7.0 on EC2 Rails Infrastructure Notes

When I got to the instruction to run chef-client:
chef-client -t `cat /etc/chef/validation_token` -j config/ops_master.json

I get the error:
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 401 "Authorization Required" (Net::HTTPServerException)
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/rest.rb:232:in `run_request'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/rest.rb:95:in `post_rest'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/client.rb:227:in `authenticate'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/client.rb:74:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/application/client.rb:163:in `run_application'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/application/client.rb:161:in `loop'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/application/client.rb:161:in `run_application'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/application.rb:53:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.0/bin/chef-client:26
from /usr/bin/chef-client:19:in `load'
from /usr/bin/chef-client:19

This error means your client is not authorized - navigate to your chef server and 'validate' the registration.

A validation token will only work for the first run if an invalid registration does not already exist on the Chef Server.


It wasn't clear that if I was using the roles stuff if I still need to edit config/ops_master.json or leave it as:
{
  "run_list": [ "role[base]", "role[ops_master]" ]
}

Not sure what you mean here?


Also  its not really clear how to set up the user associated with $ldap_user. Do you need to create the home dir manually before doing the .ssh stuff? If so where does the userid of the chown come from? From ldap? If so its not working for me maybe because I didn't get the chef-client to run properly?

Nor this..?


Thanks!
__________________
Robert J Berger - CTO
Runa.com (Solana Systems Corp)
+1 408-838-8896


-- 
AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com




Archive powered by MHonArc 2.6.16.

§