Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Error #3

Open
alpeshror opened this issue Mar 5, 2015 · 2 comments
Open

Setup Error #3

alpeshror opened this issue Mar 5, 2015 · 2 comments

Comments

@alpeshror
Copy link

I have installed cookbook and when I run setup command I got this error.

Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks-resque/recipes/setup.rb

NoMethodError

undefined method `[]' for nil:NilClass

Cookbook Trace:

/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks-resque/recipes/setup.rb:23:in block in from_file' /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks-resque/recipes/setup.rb:10:ineach'
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks-resque/recipes/setup.rb:10:in `from_file'

Relevant File Content:

/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks-resque/recipes/setup.rb:

16: mode '0644'
17: variables deploy: deploy
18: end
19:
20: settings = node[:resque][application]
21: # configure rails_env in case of non-rails app
22: rack_env = deploy[:rails_env] || settings[:rack_env] || settings[:rails_env]
23>> settings[:workers].each do |queue, quantity|
24:
25: quantity.times do |idx|
26: idx = idx + 1 # make index 1-based
27: template "/etc/init/resque-#{application}-#{idx}.conf" do
28: source "resque-n.conf.erb"
29: mode '0644'
30: variables application: application, rack_env: rack_env, deploy: deploy, queue: queue, instance: idx
31: end
32: end

[2015-03-05T11:54:00+00:00] ERROR: Running exception handlers
[2015-03-05T11:54:00+00:00] ERROR: Exception handlers complete
[2015-03-05T11:54:00+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-03-05T11:54:00+00:00] ERROR: undefined method `[]' for nil:NilClass
[2015-03-05T11:54:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Any Idea?

@arcreative
Copy link

Same issue--seems like it's just not finding the configuration for the application. At worst I would think this falls back to the default number of workers (1), but it seems that node[:resque][application] is simply nil

@arcreative
Copy link

Also, to provide a little background, I'm trying to run this on an existing instance--it wasn't started from fresh so I am trying to execute opsworks-resque::setup via Run Command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants