Re: Re: NoMethodError while installing chef-server using chef-solo on Ubuntu

Ok ... updated my rubygems to 2.0.3 (Thanks, AJ) and now received the error
below. chef-solr-installer was not installed, apparently. Any more
suggestions from anyone?

Thanks - Jim L.

Errno::ENOENT: execute[chef-solr-installer] (chef-server::rubygems-install
line 153) had an error: Errno::ENOENT: No such file or directory -
chef-solr-installer -c /etc/chef/solr.rb -u chef -g root
/usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:232:in
exec' /usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:232:in block in fork_subprocess'
/usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:222:in
fork' /usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:222:in fork_subprocess'
/usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout/unix.rb:35:in
run_command' /usr/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:222:in run_command'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/shell_out.rb:30:in
shell_out' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/shell_out.rb:35:in shell_out!'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/execute.rb:62:in
block in action_run' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/why_run.rb:52:in call'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/why_run.rb:52:in
add_action' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider.rb:151:in converge_by'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/execute.rb:61:in
action_run' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider.rb:114:in run_action'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource.rb:606:in
run_action' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:50:in run_action'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in block (2 levels) in converge' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in each'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in block in converge' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection.rb:94:in block in execute_each_resource'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:116:in
call' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:85:in
step' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection.rb:92:in execute_each_resource'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:81:in
converge' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:404:in converge'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:469:in do_run' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:200:in run'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application.rb:190:in
run_chef_client' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:239:in block in run_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:231:in
loop' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:231:in run_application'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application.rb:73:in
run' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/bin/chef-solo:25:in <top
(required)>'
/usr/bin/chef-solo:23:in load' /usr/bin/chef-solo:23:in 'root@chef:/tmp/chef-solo#

On Tue, Apr 23, 2013 at 4:53 PM, AJ Christensen aj@junglist.gen.nz wrote:

It looks like the version of rubygems in your system ruby is not
compatible with the rubygems provider. This may be a regression: The stack
trace is sufficient information to log a ticket [0]

As a work-around, try adding 'gem_binary /some/path/to/wherever/bin/gem'
to the resource in the interim. This will force the gem provider to shell
out for operations instead of using the RubyGems Ruby API.

Cheers and thanks in advance,

AJ

[0] tickets.opscode.com

On 24 April 2013 08:50, Jim L. jiml@pobox.com wrote:

Running Ubuntu 12.04.2 , Ruby 1.9.1 and installed Chef via rubygems.

Created the /etc/chef/solo.rb and ~/chef.json files per the instructions,
then ran the command:

chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r http://s3.amazonaws.com
/chef-solo/bootstrap-latest.tar.gz

The following error occurred:

NoMethodError: gem_package[chef-server-api]
(chef-server::rubygems-install line 83) had an error: NoMethodError:
undefined method `full_name' for nil:NilClass
Stack trace:

Generated at 2013-04-23 16:36:45 -0400
NoMethodError: gem_package[chef-server-api]
(chef-server::rubygems-install line 83) had an error: NoMethodError:
undefined method full_name' for nil:NilClass /usr/local/lib/site_ruby/1.9.1/rubygems/dependency_installer.rb:136:in block in gather_dependencies'
/usr/local/lib/site_ruby/1.9.1/rubygems/dependency_installer.rb:136:in
map' /usr/local/lib/site_ruby/1.9.1/rubygems/dependency_installer.rb:136:in gather_dependencies'
/usr/local/lib/site_ruby/1.9.1/rubygems/dependency_installer.rb:267:in
install' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:169:in block (2 levels) in install'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:192:in
with_correct_verbosity' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:168:in block in install'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:103:in
with_gem_sources' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:167:in install'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package/rubygems.rb:476:in
install_package' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package.rb:82:in block in action_install'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/why_run.rb:52:in
call' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/mixin/why_run.rb:52:in add_action'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider.rb:151:in
converge_by' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider/package.rb:80:in action_install'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/provider.rb:114:in
run_action' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource.rb:606:in run_action'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:50:in
run_action' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in block
(2 levels) in converge'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in each' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:82:in block
in converge'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection.rb:94:in
block in execute_each_resource' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:116:in call'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:85:in step'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource_collection.rb:92:in
execute_each_resource' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/runner.rb:81:in converge'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:404:in
converge' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:469:in do_run'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/client.rb:200:in run' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application.rb:190:in run_chef_client'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:239:in
block in run_application' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:231:in loop'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application/solo.rb:231:in
run_application' /usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/application.rb:73:in run'
/usr/lib/ruby/gems/1.9.1/gems/chef-11.4.2/bin/chef-solo:25:in <top (required)>' /usr/bin/chef-solo:19:in load'
/usr/bin/chef-solo:19:in `'root@chef:/tmp/chef-solo#

Has anyone come across this error? Am I missing something here?

--Jim L.

On Tuesday, April 23, 2013 at 2:56 PM, Jim L. wrote:

Ok ... updated my rubygems to 2.0.3 (Thanks, AJ) and now received the error below. chef-solr-installer was not installed, apparently. Any more suggestions from anyone?

Thanks - Jim L.

For whatever reason, your rubygems install is not placing executables on the PATH.

Also, I believe only master of Chef is compatible with rubygems 2.x, so perhaps you're not using the ruby installation you expected to be using?

And also, is there a particular reason you're not using the Chef 11 server w/ the omnibus installer? It's 100x easier to use, and compatible with Chef 10.x clients if you happen to be stuck on 10.x for some reason.

--
Daniel DeLeo

Hi Daniel,

Seems the Chef 11 server w/ the omnibus installer is not much better:

(chef-server_11.0.8-rc.2+20130422083058.git.19.10e571b-1.ubuntu.12.04_amd64.deb)

This is a brand-new Ubuntu 12.04.1 system, btw.

Generated at 2013-04-23 19:50:30 -0400
Mixlib::ShellOut::ShellCommandFailed: execute[verify-system-status]
(chef-server::bootstrap line 24) had an error:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0],
but received '22'
---- Begin output of curl -sf http://127.0.0.1:8000/_status ----
STDOUT:
STDERR:
---- End output of curl -sf http://127.0.0.1:8000/_status ----
Ran curl -sf http://127.0.0.1:8000/_status returned 22
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:248:in
invalid!' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.1.0/lib/mixlib/shellout.rb:234:in error!'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/shell_out.rb:36:in
shell_out!' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/provider/execute.rb:62:in block in action_run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/why_run.rb:52:in
call' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/mixin/why_run.rb:52:in add_action'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/provider.rb:151:in
converge_by' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/provider/execute.rb:61:in action_run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/provider.rb:114:in
run_action' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource.rb:603:in run_action'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/runner.rb:50:in
run_action' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/runner.rb:82:in block (2 levels) in converge'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/runner.rb:82:in
each' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/runner.rb:82:in block in converge'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection.rb:94:in
block in execute_each_resource' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection/stepable_iterator.rb:116:in call'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection/stepable_iterator.rb:85:in step'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/resource_collection.rb:92:in
execute_each_resource' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/runner.rb:81:in converge'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:404:in
converge' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:469:in do_run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:200:in
run' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:190:in run_chef_client'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:239:in
block in run_application' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in loop'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in
run_application' /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:73:in run'
/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/bin/chef-solo:25:in
<top (required)>' /opt/chef-server/embedded/bin/chef-solo:23:in load'
/opt/chef-server/embedded/bin/chef-solo:23:in `'root@ub-12
:/opt/chef-server/embedded/cookbooks/cache#

On Tue, Apr 23, 2013 at 6:10 PM, Daniel DeLeo dan@kallistec.com wrote:

On Tuesday, April 23, 2013 at 2:56 PM, Jim L. wrote:

Ok ... updated my rubygems to 2.0.3 (Thanks, AJ) and now received the
error below. chef-solr-installer was not installed, apparently. Any more
suggestions from anyone?

Thanks - Jim L.

For whatever reason, your rubygems install is not placing executables on
the PATH.

Also, I believe only master of Chef is compatible with rubygems 2.x, so
perhaps you're not using the ruby installation you expected to be using?

And also, is there a particular reason you're not using the Chef 11 server
w/ the omnibus installer? It's 100x easier to use, and compatible with Chef
10.x clients if you happen to be stuck on 10.x for some reason.

--
Daniel DeLeo

On Tuesday, April 23, 2013 at 4:55 PM, Jim L. wrote:

Hi Daniel,

Seems the Chef 11 server w/ the omnibus installer is not much better:

(chef-server_11.0.8-rc.2+20130422083058.git.19.10e571b-1.ubuntu.12.04_amd64.deb)

This is a brand-new Ubuntu 12.04.1 system, btw.

Generated at 2013-04-23 19:50:30 -0400
Mixlib::ShellOut::ShellCommandFailed: execute[verify-system-status] (chef-server::bootstrap line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '22'
---- Begin output of curl -sf http://127.0.0.1:8000/_status ----
STDOUT:
STDERR:
---- End output of curl -sf http://127.0.0.1:8000/_status ----
Ran curl -sf http://127.0.0.1:8000/_status returned 22

Does this host have a FQDN set, does hostname --fdqn return a sane result?

--
Daniel DeLeo