Skip to content

Instantly share code, notes, and snippets.

@pburkholder
Created June 21, 2013 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pburkholder/5833738 to your computer and use it in GitHub Desktop.
Save pburkholder/5833738 to your computer and use it in GitHub Desktop.
Chef stops at ruby_block:
================================================================================
Recipe Compile Error in /srv/chef/file_store/cookbooks/monitor/recipes/master.rb
================================================================================
Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching ruby_block[sensu_service_trigger] (did you define it first?)
Cookbook Trace:
---------------
/srv/chef/file_store/cookbooks/sensu/recipes/api_service.rb:24:in `from_file'
/srv/chef/file_store/cookbooks/sensu/recipes/api_service.rb:20:in `from_file'
/srv/chef/file_store/cookbooks/monitor/recipes/master.rb:25:in `from_file'
Relevant File Content:
----------------------
/srv/chef/file_store/cookbooks/sensu/recipes/api_service.rb:
17: # limitations under the License.
18: #
19:
20: service "sensu-api" do
21: provider node.platform_family =~ /debian/ ? Chef::Provider::Service::Init::Debian : Chef::Provider::Service::Init::Redhat
22: supports :status => true, :restart => true
23: action [:enable, :start]
24>> subscribes :restart, resources("ruby_block[sensu_service_trigger]"), :delayed
25: end
26:
[2013-06-21T19:25:41+00:00] ERROR: Running exception handlers
[2013-06-21T19:25:41+00:00] FATAL: Saving node information to /srv/chef/file_store/failed-run-data.json
[2013-06-21T19:25:41+00:00] ERROR: Exception handlers complete
[2013-06-21T19:25:41+00:00] FATAL: Stacktrace dumped to /srv/chef/file_store/chef-stacktrace.out
[2013-06-21T19:25:41+00:00] FATAL: Chef::Exceptions::ResourceNotFound: Cannot find a resource matching ruby_block[sensu_service_trigger] (did you define it first?)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
@adam-sge
Copy link

adam-sge commented Sep 3, 2013

Did you ever figure out what causes this exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment