chef 12.10.58 does not work with vagrant

Created on 18 May 2016  路  8Comments  路  Source: chef/chef

Description

trying to run vagrant up using chef_solo as the provisioner fails with the following:

The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
chef_server_url "chefzero://localhost:8889"

I'm posting this issue here because it seems to involve chef server, chef zero, chef client, and chef solo. Let me know if i need to close this and post it elsewhere.

Chef Version

chef version: 12.10.58
vagrant version: 1.8.1
virtualbox version: 5.0

list of vagrant plugins:

vagrant-berkshelf (4.1.0)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.5, system)

Platform Version

vagrant box is running ubuntu/trusty64 (x86_64-linux)

Replication Case

simply run vagrant up

Using the following Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.provider "virtualbox" do |v|
    v.memory = 3072
  end

  # config.omnibus.chef_version = '12.10.24'
  config.berkshelf.enabled = true
  config.berkshelf.berksfile_path = "cookbooks/Berksfile"
  config.vm.box = "ubuntu/trusty64"

  config.vm.provision "chef_solo" do |chef|
    chef.add_recipe "any cookbook that you've specified in your Berksfile"
  end
end

Stacktrace:

https://gist.github.com/mistermoe/19ba34a66f6f3d01055c7cd74788e6fb

I switched to chef 12.10.24 and everything worked just fine

Critical

Most helpful comment

Rolling back chef to 12.10.24 also solved the issue for me. Thanks!

All 8 comments

Rolling back chef to 12.10.24 also solved the issue for me. Thanks!

For the record, this looks like a chef-zero bug. Working on it.

When running "vagrant up" on an Ubuntu 16.04 box it seems to be caused by the fact that omnibus doesn't have an installer for 16.04.

@adfinlay that's not related to this bug, please don't cross post issues.

for the record a fix is adding chef.version = "12.10.40"

[edit]
This worked for me, you may have different luck or use a different version. 12.10.24 may also work.

Using chef.version = "12.10.40" and getting this error:

    default: Installing Chef (12.10.40)...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

curl -sL https://www.chef.io/chef/install.sh | sudo bash -s -- -v "12.10.40"

Stdout from the command:

ubuntu 12.04 x86_64
Getting information for chef stable 12.10.40 for ubuntu...
downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=12.10.40&p=ubuntu&pv=12.04&m=x86_64
  to file /tmp/install.sh.2285/metadata.txt
trying wget...
ERROR 404
Omnitruck artifact does not exist for version 12.10.40 on platform ubuntu

Either this means:
   - We do not support ubuntu
   - We do not have an artifact for 12.10.40

This is often the latter case due to running a prerelease or RC version of chef
or a gem version which was only pushed to rubygems and not omnitruck.

You may be able to set your knife[:bootstrap_version] to the most recent stable
release of Chef to fix this problem (or the most recent stable major version number).

In order to test the version parameter, adventurous users may take the Metadata URL
below and modify the '&v=<number>' parameter until you successfully get a URL that
does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
succesfully.

If you cannot fix this problem by setting the bootstrap_version, it probably means
that ubuntu is not supported.

Metadata URL: https://omnitruck-direct.chef.io/stable/chef/metadata?v=12.10.40&p=ubuntu&pv=12.04&m=x86_64


Stderr from the command:

stdin: is not a tty

12.10.24 seems to be available, not sure why 12.10.40 isn't available any more. I went with that one because 12.10.24 wasn't available. According to @elatomo 12.10.14 should work. I have not tried it. Let me know how it goes.

I'm going to lock this issue to prevent future me-too-ing. It is a known issue that Vagrant defaults to installing Chef's continuous builds (i.e. master branch builds), and while we try to keep master always shippable there may be short-term breakages sometimes. This has been fixed in Vagrant's code (to install from Chef's stable releases as most users expect it to) but Vagrant needs a release in order for that to be the default. You can always set the install channel to stable in your Vagrantfile to correct this.

Was this page helpful?
0 / 5 - 0 ratings