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

get_chef_server_url': undefined method `ip_address' for nil:NilClass #31

Open
joelmoss opened this issue Dec 18, 2013 · 3 comments
Open

Comments

@joelmoss
Copy link

On 0.5.2...

$ vagrant up    
Bringing machine 'default' up with 'virtualbox' provider...
/Users/joelmoss/.vagrant.d/gems/gems/vagrant-chef-zero-0.5.2/lib/vagrant-chef-zero/env_helpers.rb:53:in `get_chef_server_url': undefined method `ip_address' for nil:NilClass (NoMethodError)
    from /Users/joelmoss/.vagrant.d/gems/gems/vagrant-chef-zero-0.5.2/lib/vagrant-chef-zero/action/reconfig.rb:17:in `initialize'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:90:in `new'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:90:in `finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:20:in `block in initialize'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:20:in `map'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:20:in `initialize'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:170:in `new'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:170:in `to_app'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/machine.rb:147:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
    from /Users/joelmoss/.vagrant.d/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
    from /Users/joelmoss/.vagrant.d/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
@andrewgross
Copy link
Contributor

Thanks for reporting, looks like an issue when we find no private IPv4 address when listing the interfaces with ::Socket.ip_address_list

Any idea what might be going on with your machine?

You can try the following code to get the list of objects that it is filtering.

require 'socket'
puts Socket.ip_address_list
puts Socket.ip_address_list.each { |i| puts i.inspect } 

@andrewgross
Copy link
Contributor

It looks like the logic as it is now will not detect the loopback interface as a valid address. I will need to think about some better logic to implement this so we can reliable find the interface in use.

@electrofelix
Copy link

Could be due to the first time running vagrant where the provider hasn't yet created a suitable network.

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