chef-cookbooks / chef-server

Cookbook to install standalone Chef Server

Home Page:http://supermarket.chef.io/cookbooks/chef-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error executing action `run` on resource 'execute[/opt/opscode/bin/private-chef-ctl start oc_id]'

lmilbaum opened this issue · comments

Cookbook version

5.0.1

Chef-client version

12.30.37

Platform Details

Ubuntu 12.04 AWS

Scenario:

I am trying to provision a VM with chef-server

[2016-09-01T15:53:48+00:00] INFO: runit_service[oc_id] enabled
[2016-09-01T15:53:50+00:00] INFO: Processing execute[/opt/opscode/bin/private-chef-ctl start oc_id] action run (private-chef::oc_id line 155)
[2016-09-01T15:53:57+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 19 attempt(s) left
[2016-09-01T15:54:03+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 18 attempt(s) left
[2016-09-01T15:54:08+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 17 attempt(s) left
[2016-09-01T15:54:13+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 16 attempt(s) left
[2016-09-01T15:54:17+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 15 attempt(s) left
[2016-09-01T15:54:21+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 14 attempt(s) left
[2016-09-01T15:54:26+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 13 attempt(s) left
[2016-09-01T15:54:30+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 12 attempt(s) left
[2016-09-01T15:54:35+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 11 attempt(s) left
[2016-09-01T15:54:39+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 10 attempt(s) left
[2016-09-01T15:54:44+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 9 attempt(s) left
[2016-09-01T15:54:48+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 8 attempt(s) left
[2016-09-01T15:54:52+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 7 attempt(s) left
[2016-09-01T15:54:57+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 6 attempt(s) left
[2016-09-01T15:55:01+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 5 attempt(s) left
[2016-09-01T15:55:06+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 4 attempt(s) left
[2016-09-01T15:55:10+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 3 attempt(s) left
[2016-09-01T15:55:15+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 2 attempt(s) left
[2016-09-01T15:55:19+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 1 attempt(s) left
[2016-09-01T15:55:24+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 0 attempt(s) left

================================================================================
Error executing action run on resource 'execute[/opt/opscode/bin/private-chef-ctl start oc_id]'

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/bin/private-chef-ctl start oc_id ----
STDOUT:
STDERR: /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in run_sv_command_for_service': undefined methodexitstatus' for nil:NilClass (NoMethodError)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:348:in run_sv_command' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:inblock (2 levels) in class:Ctl'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in run' from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in

'
---- End output of /opt/opscode/bin/private-chef-ctl start oc_id ----
Ran /opt/opscode/bin/private-chef-ctl start oc_id returned 1

Resource Declaration:


In /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb

155: execute "/opt/opscode/bin/private-chef-ctl start oc_id" do
156: retries 20
157: end
158: end

Compiled Resource:


Declared in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb:155:in `from_file'

execute("/opt/opscode/bin/private-chef-ctl start oc_id") do
action [:run]
retries 20
retry_delay 2
default_guard_interpreter :execute
command "/opt/opscode/bin/private-chef-ctl start oc_id"
backup 5
returns 0
declared_type :execute
cookbook_name "private-chef"
recipe_name "oc_id"
end

Platform:


x86_64-linux

[2016-09-01T15:55:28+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-09-01T15:55:28+00:00] INFO: template[/var/log/opscode/rabbitmq/config] sending run action to executerestart_rabbitmq_log_service
[2016-09-01T15:55:28+00:00] INFO: Processing execute[restart_rabbitmq_log_service] action run (private-chef::rabbitmq line 19)
[2016-09-01T15:55:29+00:00] INFO: execute[restart_rabbitmq_log_service] ran successfully
[2016-09-01T15:55:29+00:00] INFO: execute[/opt/opscode/embedded/bin/rabbitmq-plugins enable rabbitmq_management] sending restart action to runit_servicerabbitmq
[2016-09-01T15:55:29+00:00] INFO: Processing runit_service[rabbitmq] action restart (private-chef::rabbitmq line 37)
[2016-09-01T15:55:29+00:00] INFO: runit_service[rabbitmq] restarted
[2016-09-01T15:55:29+00:00] INFO: private_chef_pg_cluster[/var/opt/opscode/postgresql/9.2/data] sending restart action to runit_servicepostgresql
[2016-09-01T15:55:29+00:00] INFO: Processing runit_service[postgresql] action restart (private-chef::postgresql line 37)
[2016-09-01T15:55:33+00:00] INFO: runit_service[postgresql] restarted
[2016-09-01T15:55:33+00:00] INFO: template[/var/log/opscode/postgresql/9.2/config] sending run action to executerestart_postgresql_log_service
[2016-09-01T15:55:33+00:00] INFO: Processing execute[restart_postgresql_log_service] action run (private-chef::postgresql line 19)
[2016-09-01T15:55:34+00:00] INFO: execute[restart_postgresql_log_service] ran successfully
[2016-09-01T15:55:34+00:00] INFO: template[/var/opt/opscode/oc_bifrost/sys.config] sending restart action to runit_serviceoc_bifrost
[2016-09-01T15:55:34+00:00] INFO: Processing runit_service[oc_bifrost] action restart (private-chef::oc_bifrost line 37)
[2016-09-01T15:55:35+00:00] INFO: runit_service[oc_bifrost] restarted
[2016-09-01T15:55:35+00:00] INFO: template[/var/log/opscode/oc_bifrost/config] sending run action to executerestart_oc_bifrost_log_service
[2016-09-01T15:55:35+00:00] INFO: Processing execute[restart_oc_bifrost_log_service] action run (private-chef::oc_bifrost line 19)
[2016-09-01T15:55:35+00:00] INFO: execute[restart_oc_bifrost_log_service] ran successfully
[2016-09-01T15:55:35+00:00] INFO: file[/var/opt/opscode/oc_id/config/production.yml] sending restart action to runit_serviceoc_id
[2016-09-01T15:55:35+00:00] INFO: Processing runit_service[oc_id] action restart (private-chef::oc_id line 37)
[2016-09-01T15:55:36+00:00] INFO: runit_service[oc_id] restarted
[2016-09-01T15:55:36+00:00] INFO: template[/var/log/opscode/oc_id/config] sending run action to executerestart_oc_id_log_service
[2016-09-01T15:55:36+00:00] INFO: Processing execute[restart_oc_id_log_service] action run (private-chef::oc_id line 19)
[2016-09-01T15:55:36+00:00] INFO: execute[restart_oc_id_log_service] ran successfully
[2016-09-01T15:55:36+00:00] ERROR: Running exception handlers
[2016-09-01T15:55:36+00:00] ERROR: Exception handlers complete
[2016-09-01T15:55:36+00:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2016-09-01T15:55:36+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-01T15:55:36+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[/opt/opscode/bin/private-chef-ctl start oc_id](private-chef::oc_id line 155) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/bin/private-chef-ctl start oc_id ----
STDOUT:
STDERR: /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in run_sv_command_for_service': undefined methodexitstatus' for nil:NilClass (NoMethodError)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:348:in run_sv_command' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:inblock (2 levels) in class:Ctl'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in run' from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in

'
---- End output of /opt/opscode/bin/private-chef-ctl start oc_id ----
Ran /opt/opscode/bin/private-chef-ctl start oc_id returned 1
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 1
[2016-09-01T15:55:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Make sure your VM meets the minimum requirements... I ran into some strange errors during install when I didn't allocate enough memory or CPU.
https://docs.chef.io/chef_system_requirements.html

Thanks. Your advice did the trick.