- From: Gilles Devaux <
>
- To:
- Subject: [chef] Re: Re: chef-client runs only locally as root
- Date: Thu, 11 Mar 2010 12:13:50 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=Fpox9esk/+/HC/xPjLG+wTmVEAqYJE7e3jTTtWFHBaoY6Tk8sgtTcaVyCmhRGj5gbw Lrfmj1URBouDtqjdeyO4vOKK2ye0Lh7pOr9NfW/UZMAjUPCIDDHgZxCgpHqJZ+8pRH6I ycOzjhNdkY7PGTrfVNijBC9RpC+4VqfhH6cwE=
Hi Joshua,
I have more info, this is only happening on the machines where
ruby-entreprise is installed.
On these machines ruby is compiled from sources (default install path), gem
is compiled from source (default install path). Chef is installed from gem,
ruby-entreprise is installed through chef in /opt/ruby-entreprise.
~]$ which ruby
/usr/local/bin/ruby
~]$ /usr/local/bin/ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
ruby-entreprise is not in the path.
Thanks
--Gilles
ps: I still do not have time to work on merging the changes I made on the
cookbooks to be more centos friendly but I will.
On Mar 11, 2010, at 10:58 AM, Joshua Timberman wrote:
>
-----BEGIN PGP SIGNED MESSAGE-----
>
Hash: SHA1
>
>
Hello!
>
>
That error looks like one I ran into where 'ruby' wasn't in the $PATH,
>
though 'ruby1.8' was. Are you on a system like Debian that has separate
>
ruby1.8 and ruby packages, and 'ruby' isn't installed?
>
>
>
On Mar 11, 2010, at 11:18 AM, Gilles Devaux wrote:
>
>
> Hi,
>
>
>
> I am trying to execute chef-client remotely but I run into this exception:
>
>
>
> /usr/local/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in
>
> `join': can't convert nil into String (TypeError)
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in
>
> `all_plugins'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in
>
> `each'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in
>
> `all_plugins'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/client.rb:121:in
>
> `run_ohai'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/client.rb:126:in
>
> `determine_node_name'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/client.rb:83:in
>
> `run'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/application/client.rb:204:in
>
> `run_application'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/application/client.rb:196:in
>
> `loop'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/application/client.rb:196:in
>
> `run_application'
>
> from
>
> /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/../lib/chef/application.rb:57:in
>
> `run'
>
> from /usr/local/lib/ruby/gems/1.8/gems/chef-0.8.6/bin/chef-client:26
>
> from /usr/local/bin/chef-client:19:in `load'
>
> from /usr/local/bin/chef-client:19
>
>
>
> Here is the debug log
>
>
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Loading plugin kernel
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -s STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Linux
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -s STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -s STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG:
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -s STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Ran (uname -s) returned 0
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -r STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: 2.6.32.1-rscloud
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -r STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -r STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG:
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -r STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Ran (uname -r) returned 0
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -v STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: #15 SMP Mon Feb 22 13:22:15 UTC
>
> 2010
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -v STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -v STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG:
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -v STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Ran (uname -v) returned 0
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -m STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: x86_64
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -m STDOUT ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- Begin uname -m STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG:
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: ---- End uname -m STDERR ----
>
> [Thu, 11 Mar 2010 18:09:45 +0000] DEBUG: Ran (uname -m) returned 0
>
>
>
> I am having the same exception when:
>
> - I invoke sudo chef-client from a non-root user (this is the same use
>
> case as trying remotely with ssh 'sudo chef-client'
>
> - the chef-client deamon runs every 30 minutes -> the deamon runs as
>
> root:root: (root 1218 0.0 0.9 92588 19360 ? S Mar10
>
> 0:00 /usr/local/bin/ruby /usr/bin/chef-client -d -c /etc/chef/client.rb -i
>
> 1800 -s 20 -L /var/log/chef/client.log)
>
>
>
> only running chef-client as root locally works.
>
>
>
> I have the same $PATH in both cases:
>
> - running as root
>
> - running as sudo (I have included /sbin, /usr/sbin, /usr/local/sbin)
>
>
>
> Any help appreciated at this point
>
>
>
> Thanks
>
>
>
> --Gilles
>
>
- --
>
Opscode, Inc
>
Joshua Timberman, Senior Solutions Engineer
>
C: 720.334.RUBY E:
>
>
>
-----BEGIN PGP SIGNATURE-----
>
Version: GnuPG v1.4.10 (Darwin)
>
>
iEUEARECAAYFAkuZPXMACgkQO97WSdVpzT0QkQCYwHgvaYZQt9JEu1sJceNSSeTU
>
BgCfQguUm3WMF3HnV0Au07pFSr3TYo0=
>
=lZiw
>
-----END PGP SIGNATURE-----
Archive powered by MHonArc 2.6.16.