rackbox-cookbook
rackbox-cookbook copied to clipboard
Error executing action `restart` on resource 'runit_service[myapp]'
trafficstars
I just ran into this error:
Recipe: rackbox::unicorn
* runit_service[myapp] action restart
================================================================================
Error executing action `restart` on resource 'runit_service[myapp]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/sv restart /etc/service/myapp ----
STDOUT: timeout: down: /etc/service/myapp: 0s, normally up, want up
STDERR:
---- End output of /usr/bin/sv restart /etc/service/myapp ----
Ran /usr/bin/sv restart /etc/service/myapp returned 1
Cookbook Trace:
---------------
/root/chef-solo/cookbooks-1/runit/libraries/provider_runit_service.rb:182:in `restart_service'
Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-1/rackbox/libraries/helpers.rb
41: runit_service app["appname"] do
42: run_template_name config["template_name"]
43: log_template_name config["template_name"]
44: cookbook config["template_cookbook"]
45: options(
46: :user => node["appbox"]["apps_user"],
47: :group => node["appbox"]["apps_user"],
48: :rack_env => config["rack_env"],
49: :smells_like_rack => true, #::File.exists?(::File.join(app_dir, "config.ru")),
50: :unicorn_config_file => unicorn_config_file,
51: :working_directory => app_dir
52: )
53: restart_on_update false
54: end
55: end
Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-1/rackbox/libraries/helpers.rb:41:in `setup_unicorn_runit'
runit_service("myapp") do
provider Chef::Provider::Service::Runit
action :enable
updated true
supports {:restart=>true, :reload=>true, :status=>true}
retries 0
retry_delay 2
service_name "myapp"
enabled true
pattern "myapp"
status_command "/usr/bin/sv status /etc/service"
startup_type :automatic
sv_bin "/usr/bin/sv"
sv_dir "/etc/sv"
service_dir "/etc/service"
lsb_init_dir "/etc/init.d"
options {:user=>"apps", :group=>"apps", :rack_env=>"production", :smells_like_rack=>true, :unicorn_config_file=>"/etc/unicorn/myapp.rb", :working_directory=>"/home/apps/myapp/current"}
log true
cookbook "rackbox"
run_template_name "unicorn"
log_template_name "unicorn"
finish_script_template_name "myapp"
sv_templates true
service_mirror # Declared in
service("myapp") do
provider Chef::Provider::Service::Simple
action [:nothing]
supports {:restart=>true, :reload=>true, :status=>true}
retries 0
retry_delay 2
service_name "myapp"
pattern "myapp"
start_command "/usr/bin/sv start /etc/service/myapp"
stop_command "/usr/bin/sv stop /etc/service/myapp"
status_command "/usr/bin/sv status /etc/service/myapp"
restart_command "/usr/bin/sv restart /etc/service/myapp"
startup_type :automatic
end
cookbook_name :rackbox
recipe_name "unicorn"
end
[2013-09-01T06:17:24+00:00] ERROR: Running exception handlers
[2013-09-01T06:17:24+00:00] ERROR: Exception handlers complete
[2013-09-01T06:17:24+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 126 resources updated
[2013-09-01T06:17:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.
Did you have any luck solving this? I've just randomly got exactly the same issue.
I never solved this. I reported the issue, then moved on to using a different tool. I would love to see this resolved so I could try it out again.
Look in the /etc/service/myapp/log/main/current file, it may contain a more specific error reason.