mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 572 forks source link

vagrant provision #462

Open sasipalakizhi opened 8 years ago

sasipalakizhi commented 8 years ago

When I am executing vagrant up or vagrant provision, it fails with the below error. Any suggestion to fix this is welcome.

==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/lib/chef/application/client.rb:442:in `loop'
==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/lib/chef/application/client.rb:442:in `interval_run_chef_client'
==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/lib/chef/application/client.rb:426:in `run_application'
==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/lib/chef/application.rb:58:in `run'
==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/lib/chef/application/solo.rb:216:in `run'
==> local: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.10.60/bin/chef-solo:25:in `<top (required)>'
==> local: /usr/bin/chef-solo:52:in `load'
==> local: /usr/bin/chef-solo:52:in `<main>'
==> local: [2016-05-19T01:14:10-07:00] INFO: HTTP Request Returned 404 Not Found: Parent not found: chefzero://localhost:8889/nodes
==> local: ================================================================================
==> local: Chef encountered an error attempting to load the node data for "vagrant-2b949cc8"
==> local: ================================================================================
==> local: Resource Not Found:
==> local: -------------------
==> local: The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
==> local: Relevant Config Settings:
==> local: -------------------------
==> local: chef_server_url "chefzero://localhost:8889"
==> local: Platform:
==> local: ---------
==> local: x86_64-linux
==> local: Running handlers:
==> local: [2016-05-19T01:14:10-07:00] ERROR: Running exception handlers
==> local: Running handlers complete
==> local: [2016-05-19T01:14:10-07:00] ERROR: Exception handlers complete
==> local: Chef Client failed. 0 resources updated in 01 seconds
==> local: [2016-05-19T01:14:10-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> local: [2016-05-19T01:14:10-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> local: [2016-05-19T01:14:10-07:00] ERROR: 404 "Not Found"
==> local: [2016-05-19T01:14:10-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
zdxn commented 8 years ago

==> local: Chef encountered an error attempting to load the node data for "vagrant-2b949cc8" ==> local: ================================================================================ ==> local: Resource Not Found:

Do you have a role created that is named vagrant-2b948cc8?

dmerrick commented 8 years ago

I believe this is related to this issue in Chef core.

The fix seems to be to add the following to your chef_solo provisioner section in your Vagrantfile:

chef.version = '12.10.40'
ericgoedtel commented 8 years ago

The above seemed to work for me but is not working, now:

Omnitruck artifact does not exist for version 12.10.40 on platform ubuntu

ericgoedtel commented 8 years ago

As an aside: This seems like its resolved by updating Vagrant to > 1.8.1