I get the following exception:
$ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo -c ~/solo.rb -j
~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo Run
/var/lib/gems/1.8/gems/chef-0.7.16/bin/…/lib/chef/node/attribute.rb:387:in
method_missing': Attribute domain is not defined! (ArgumentError) from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in
send’
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/…/lib/chef/node.rb:238:in
method_missing' from /tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in
from_file’
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/…/lib/chef/cookbook.rb:78:in
`load_attributes’
So I tried with:
$ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/…/lib/ohai/config.rb:19:in require': no such file to load -- mixlib/config (LoadError) from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in
require’
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/…/lib/ohai.rb:22
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/…/lib/ohai/application.rb:18:in
require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in
require’
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
It’s strange it seems that mixlib library isn’t installed even if it is.
I tried to verify the gem repository, but it seems ok:
$ gem list mixlib
*** LOCAL GEMS ***
mixlib-cli (1.0.4)
mixlib-config (1.0.12)
mixlib-log (1.0.3)
$ gem contents mixlib-config
LICENSE
README.rdoc
Rakefile
VERSION.yml
lib/mixlib/config.rb
spec/mixlib/config_spec.rb
spec/spec.opts
spec/spec_helper.rb
Do I need to check something else in order to solve the problem?
Thanks and regards,
Alessandro
Ohai!
When you install a ruby gem, it generates an executable file that adds
a 'require "rubygems"' to the original version. IIRC, we no longer
require rubygems in the version of ohai in the tree, but instead rely
on the gem install process to do this. So you should have a copy of
the ohai command elsewhere (depends on your rubygems config) that will
work.
The error you get running chef-solo has a different cause, usually you
don't have the host file setup with the FQDN. Does 'hostname -f'
return the FQDN of this box?
HTH,
Dan DeLeo
On Friday, January 29, 2010, Alessandro Marino ale.marino78@gmail.com wrote:
I get the following exception:
$ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo -c ~/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo Run/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node/attribute.rb:387:in `method_missing': Attribute domain is not defined! (ArgumentError)
from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in `send' from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in `method_missing' from /tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in `from_file'
from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/cookbook.rb:78:in `load_attributes'
So I tried with:
$ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19:in `require': no such file to load -- mixlib/config (LoadError) from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in `require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18:in `require'
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in `require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
It's strange it seems that mixlib library isn't installed even if it is.I tried to verify the gem repository, but it seems ok:
$ gem list mixlib
*** LOCAL GEMS ***
mixlib-cli (1.0.4)mixlib-config (1.0.12)mixlib-log (1.0.3)
$ gem contents mixlib-configLICENSEREADME.rdoc
RakefileVERSION.ymllib/mixlib/config.rbspec/mixlib/config_spec.rbspec/spec.optsspec/spec_helper.rb
Do I need to check something else in order to solve the problem?
Thanks and regards,Alessandro
I get:
alexyz78@goldrake:~$ hostname -f
goldrake
It hasn't a FQDN because I'm testing chef with two pc connected each other
without a DNS.
Is the FQDN mandatory ?
Alessandro
2010/1/29 Daniel DeLeo dan@kallistec.com
Ohai!
When you install a ruby gem, it generates an executable file that adds
a 'require "rubygems"' to the original version. IIRC, we no longer
require rubygems in the version of ohai in the tree, but instead rely
on the gem install process to do this. So you should have a copy of
the ohai command elsewhere (depends on your rubygems config) that will
work.
The error you get running chef-solo has a different cause, usually you
don't have the host file setup with the FQDN. Does 'hostname -f'
return the FQDN of this box?
HTH,
Dan DeLeo
On Friday, January 29, 2010, Alessandro Marino ale.marino78@gmail.com
wrote:
I get the following exception:
$ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo -c ~/solo.rb -j
~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo
Run/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node/attribute.rb:387:in
`method_missing': Attribute domain is not defined! (ArgumentError)
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in send' from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in
method_missing' from
/tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in `from_file'
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/cookbook.rb:78:in
`load_attributes'
So I tried with:
$ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19:in
`require': no such file to load -- mixlib/config (LoadError) from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in
require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18:in
require'
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in `require' from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
It's strange it seems that mixlib library isn't installed even if it is.I
tried to verify the gem repository, but it seems ok:
$ gem list mixlib
*** LOCAL GEMS ***
mixlib-cli (1.0.4)mixlib-config (1.0.12)mixlib-log (1.0.3)
$ gem contents mixlib-configLICENSEREADME.rdoc
RakefileVERSION.ymllib/mixlib/config.rbspec/mixlib/config_spec.rbspec/spec.optsspec/spec_helper.rb
Do I need to check something else in order to solve the problem?
Thanks and regards,Alessandro
Hi Alessandro,
Yes, for running Chef as client/server, FQDNs are required. The error
you are seeing is that the bootstrap process expects the node to have
a domain
attribute, which would usually be 'your_domain.com' but
when your node has no domain set, you get the nil object instead.
Setting FQDNs on everything (even if you just do it in the hosts file)
will also make it much easier when you connect the clients to the
server.
HTH,
Dan DeLeo
On Mon, Feb 1, 2010 at 2:31 PM, Alessandro Marino
ale.marino78@gmail.com wrote:
I get:
alexyz78@goldrake:~$ hostname -f
goldrake
It hasn't a FQDN because I'm testing chef with two pc connected each other
without a DNS.
Is the FQDN mandatory ?
Alessandro
2010/1/29 Daniel DeLeo dan@kallistec.com
Ohai!
When you install a ruby gem, it generates an executable file that adds
a 'require "rubygems"' to the original version. IIRC, we no longer
require rubygems in the version of ohai in the tree, but instead rely
on the gem install process to do this. So you should have a copy of
the ohai command elsewhere (depends on your rubygems config) that will
work.
The error you get running chef-solo has a different cause, usually you
don't have the host file setup with the FQDN. Does 'hostname -f'
return the FQDN of this box?
HTH,
Dan DeLeo
On Friday, January 29, 2010, Alessandro Marino ale.marino78@gmail.com
wrote:
I get the following exception:
$ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo -c ~/solo.rb -j
~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo
Run/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node/attribute.rb:387:in
`method_missing': Attribute domain is not defined! (ArgumentError)
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in send' from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in
method_missing' from
/tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in `from_file'
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/cookbook.rb:78:in
`load_attributes'
So I tried with:
$ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19:in
`require': no such file to load -- mixlib/config (LoadError) from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in
require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18:in
require'
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in `require' from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
It's strange it seems that mixlib library isn't installed even if it
is.I tried to verify the gem repository, but it seems ok:
$ gem list mixlib
*** LOCAL GEMS ***
mixlib-cli (1.0.4)mixlib-config (1.0.12)mixlib-log (1.0.3)
$ gem contents mixlib-configLICENSEREADME.rdoc
RakefileVERSION.ymllib/mixlib/config.rbspec/mixlib/config_spec.rbspec/spec.optsspec/spec_helper.rb
Do I need to check something else in order to solve the problem?
Thanks and regards,Alessandro
Thanks a lot, now it works!
Bye,
Alessandro
2010/2/2 Daniel DeLeo dan@kallistec.com
Hi Alessandro,
Yes, for running Chef as client/server, FQDNs are required. The error
you are seeing is that the bootstrap process expects the node to have
a domain
attribute, which would usually be 'your_domain.com' but
when your node has no domain set, you get the nil object instead.
Setting FQDNs on everything (even if you just do it in the hosts file)
will also make it much easier when you connect the clients to the
server.
HTH,
Dan DeLeo
On Mon, Feb 1, 2010 at 2:31 PM, Alessandro Marino
ale.marino78@gmail.com wrote:
I get:
alexyz78@goldrake:~$ hostname -f
goldrake
It hasn't a FQDN because I'm testing chef with two pc connected each
other
without a DNS.
Is the FQDN mandatory ?
Alessandro
2010/1/29 Daniel DeLeo dan@kallistec.com
Ohai!
When you install a ruby gem, it generates an executable file that adds
a 'require "rubygems"' to the original version. IIRC, we no longer
require rubygems in the version of ohai in the tree, but instead rely
on the gem install process to do this. So you should have a copy of
the ohai command elsewhere (depends on your rubygems config) that will
work.
The error you get running chef-solo has a different cause, usually you
don't have the host file setup with the FQDN. Does 'hostname -f'
return the FQDN of this box?
HTH,
Dan DeLeo
On Friday, January 29, 2010, Alessandro Marino ale.marino78@gmail.com
wrote:
I get the following exception:
$ sudo /var/lib/gems/1.8/gems/chef-0.7.16/bin/chef-solo -c ~/solo.rb
-j
~/chef.json -r
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Thu, 14 Jan 2010 16:57:46 +0100] INFO: Starting Chef Solo
Run/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node/attribute.rb:387:in
`method_missing': Attribute domain is not defined! (ArgumentError)
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in
send' from /var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/node.rb:238:in
method_missing' from
/tmp/chef-solo/cookbooks/bootstrap/attributes/bootstrap.rb:49:in
`from_file'
from
/var/lib/gems/1.8/gems/chef-0.7.16/bin/../lib/chef/cookbook.rb:78:in
`load_attributes'
So I tried with:
$ /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai -v
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19:in
`require': no such file to load -- mixlib/config (LoadError)
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/config.rb:19
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22:in
require' from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai.rb:22 from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18:in
require'
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/../lib/ohai/application.rb:18
from /var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23:in `require'
from
/var/lib/gems/1.8/gems/ohai-0.3.6/bin/ohai:23
It's strange it seems that mixlib library isn't installed even if it
is.I tried to verify the gem repository, but it seems ok:
$ gem list mixlib
*** LOCAL GEMS ***
mixlib-cli (1.0.4)mixlib-config (1.0.12)mixlib-log (1.0.3)
$ gem contents mixlib-configLICENSEREADME.rdoc
RakefileVERSION.ymllib/mixlib/config.rbspec/mixlib/config_spec.rbspec/spec.optsspec/spec_helper.rb
Do I need to check something else in order to solve the problem?
Thanks and regards,Alessandro