bflad / chef-wkhtmltopdf

Chef Cookbook for wkhtmltopdf
Other
4 stars 33 forks source link

Chef 11.4 gives error on node setup #1

Closed nicolopignatelli closed 10 years ago

nicolopignatelli commented 11 years ago

As in subject, the following error is fired during setup of a node using Cheff 11.4

[2013-09-03T16:48:34+00:00] DEBUG: Found recipe wkhtmltopdf_binary in cookbook wkhtmltopdf
[2013-09-03T16:48:34+00:00] DEBUG: filtered backtrace of compile error: 
[2013-09-03T16:48:34+00:00] DEBUG: filtered backtrace of compile error: 
[2013-09-03T16:48:34+00:00] DEBUG: backtrace entry for compile error: '/opt/aws/opsworks/releases/20130806085854_205/site-cookbooks/wkhtmltopdf/recipes/wkhtmltopdf_binary.rb:2:in `from_file''
[2013-09-03T16:48:34+00:00] DEBUG: Line number of compile error: '2'
[2013-09-03T16:48:34+00:00] ERROR: Caught exception while compiling opsworks custom run list: NoMethodError - undefined method `[]' for nil:NilClass - /opt/aws/opsworks/releases/20130806085854_205/site-cookbooks/wkhtmltopdf/recipes/wkhtmltopdf_binary.rb:2:in `from_file'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:151:in `load_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:132:in `include_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:131:in `each'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:131:in `include_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/opt/aws/opsworks/releases/20130806085854_205/site-cookbooks/mybestplanet-com/recipes/default.rb:67:in `from_file'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:151:in `load_recipe'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:139:in `compile_recipes'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:137:in `each'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:74:in `compile'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/run_context.rb:86:in `load'
/opt/aws/opsworks/releases/20130806085854_205/cookbooks/opsworks_custom_cookbooks/recipes/execute.rb:15:in `from_file'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider/ruby_block.rb:33:in `call'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider/ruby_block.rb:33:in `action_run'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/mixin/why_run.rb:52:in `call'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider.rb:151:in `converge_by'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider/ruby_block.rb:32:in `action_run'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider.rb:114:in `send'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/provider.rb:114:in `run_action'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource.rb:617:in `run_action'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/runner.rb:50:in `run_action'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/runner.rb:82:in `converge'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/runner.rb:82:in `each'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/runner.rb:82:in `converge'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/runner.rb:81:in `converge'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/client.rb:404:in `converge'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/client.rb:469:in `do_run'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/client.rb:200:in `run'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/application.rb:190:in `run_chef_client'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/application/solo.rb:239:in `run_application'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/application/solo.rb:231:in `loop'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/application/solo.rb:231:in `run_application'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/../lib/chef/application.rb:73:in `run'
/opt/aws/opsworks/releases/20130806085854_205/vendor/gems/chef-11.4.4/bin/chef-solo:25
/opt/aws/opsworks/current/bin/chef-solo:16:in `load'
/opt/aws/opsworks/current/bin/chef-solo:16
bflad commented 11 years ago

Hmmm I cannot confirm this locally on Chef 11.6.0, which I just tested right now. I imagine this has something to do with how AWS Opsworks, well, works.

The error:

ERROR: Caught exception while compiling opsworks custom run list: NoMethodError - undefined method `[]' for nil:NilClass - /opt/aws/opsworks/releases/20130806085854_205/site-cookbooks/wkhtmltopdf/recipes/wkhtmltopdf_binary.rb:2:in `from_file'

Is complaining about this line:

download_dest = File.join(cache_dir, "#{node['wkhtmltopdf']['wkhtmltopdf']['binary_full_name']}.tar.bz2")

Which makes me think it has something to do with not being able to read node attributes although I cannot see anything obvious in their documentation to suggest needing to do anything special to get cookbook attributes working. Are you still having this issue? Is there something that needs to be done to get this to work on Opsworks?

nicolopignatelli commented 11 years ago

No, it should work seamlessly, and that's why it's so weird. 99% is an OpsWorks related issue. Anyway, I directly embedded wkhtmltopdf into my project, so I do not need the recipe anymore, but I will make another attempt to test if something has changed since I created this issue.

bflad commented 10 years ago

Still working with fresh 11.8.2 installation. I'm going to close this for now since it seems to be an Opsworks issue. If there's something extra we need to be doing for supporting that environment, please reopen. Thanks!