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

NoMethodError #38

Closed
jennyfountain opened this issue Nov 25, 2013 · 4 comments
Closed

NoMethodError #38

jennyfountain opened this issue Nov 25, 2013 · 4 comments

Comments

@jennyfountain
Copy link

I am still getting the following error:

Writing to /var/run/chef-rundeck-9980.pid
Puma 1.6.3 starting...

  • Min threads: 0, max threads: 16
  • Environment: development
  • Listening on tcp://localhost:9980
    == Sinatra/1.4.4 has taken the stage on 9980 for development with backup from Puma
    NoMethodError - undefined method []' for nil:NilClass: /usr/lib64/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:59:inblock (2 levels) in class:ChefRundeck'
    /usr/lib64/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:54:in each' /usr/lib64/ruby/gems/1.9.1/gems/chef-rundeck-1.0.1/lib/chef-rundeck.rb:54:inblock in class:ChefRundeck'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:in call' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:inblock in compile!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in []' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:inblock (3 levels) in route!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in route_eval' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:inblock (2 levels) in route!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:997:in block in process_route' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:incatch'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in process_route' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:955:inblock in route!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in each' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:inroute!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1067:in block in dispatch!' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:inblock in invoke'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in catch' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:ininvoke'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1064:in dispatch!' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:inblock in call!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in block in invoke' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:incatch'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in invoke' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:incall!'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:877:in call' /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in call' /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in call' /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in call' /usr/lib64/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:in call' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/show_exceptions.rb:21:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:180:in call' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:2004:incall'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in block in call' /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1778:insynchronize'
    /usr/lib64/ruby/gems/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in call' /usr/lib64/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:412:inhandle_request'
    /usr/lib64/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:306:in process_client' /usr/lib64/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/server.rb:215:inblock in run'
    /usr/lib64/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/thread_pool.rb:94:in call' /usr/lib64/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/thread_pool.rb:94:inblock in spawn_thread'

Here is the cli I am using:
/usr/bin/ruby /usr/bin/chef-rundeck -a https://chef.server -k /etc/chef/rundeck.pem -c /etc/chef/chef-rundeck.rb -u rundeck

Ruby version ->
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]

Cert isn't self signed. How can I troubleshoot this? Thanks!

@josephholsten
Copy link
Contributor

Looks like you've got a nil in your node[:kernel]. This is a duplicate of #1

:-(

@leftathome
Copy link
Contributor

I think we do node object validation before emitting it in the project XML now, so this issue shouldn't pop up anymore. Is it still happening in the latest version?

@josephholsten
Copy link
Contributor

@leftathome I'm reasonably certain this is fixed by /lib/chef-rundeck.rb:228. It's certainly fixed for the borked nodes on my system that used to trigger this. I'm thinking this is entirely safe to close.

@jennyfountain if you're still hitting this, can you let us know?

@leftathome
Copy link
Contributor

Yep, I'll close this one out.

In the course of addressing #4 I can see how we might trigger this type of issue again. Guess I'll have to write a clever test case (our test coverage on the data validation side is a bit weak) ...

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

3 participants