Farrukh Najmi
Farrukh Najmi

Reputation: 5316

Vagrant chef provisioning fails with: Getting information for chef stable for el

I am using vagrant and chef to provision a VM. The basebox for VM is a custom virtualbox basebox that I created from a VM with a customized customized Fedora 17 OS. It likely not relevant but the custom basebox is downloaded from our local Artifactory repo and not from HashiCorp site.

Here are the salient parts of the Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.box = "GemBuildSystem-4.10"
  ...
  config.vm.provision :chef_solo do |chef|
    #Fix for: http://stackoverflow.com/questions/37336477/chefzero-returning-404
      chef.channel = "stable"
      #chef.version = "12.10.24"
      ...
    end
end

When I run the command " vagrant up --provision" I get the following error:

==> default: el 4 i386
==> default: Getting information for chef stable  for el...
==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386
==> default:   to file /tmp/install.sh.6206/metadata.txt
==> default: trying wget...
==> default: ERROR 404
==> default: Omnitruck artifact does not exist for version  on platform el
==> default: Either this means:
==> default:    - We do not support el
==> default:    - We do not have an artifact for
==> default: This is often the latter case due to running a prerelease or RC version of chef
==> default: or a gem version which was only pushed to rubygems and not omnitruck.
==> default: You may be able to set your knife[:bootstrap_version] to the most recent stable
==> default: release of Chef to fix this problem (or the most recent stable major version number).
==> default: In order to test the version parameter, adventurous users may take the Metadata URL
==> default: below and modify the '&v=<number>' parameter until you successfully get a URL that
==> default: does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
==> default: succesfully.
==> default: If you cannot fix this problem by setting the bootstrap_version, it probably means
==> default: that el is not supported.
==> default: Metadata URL: https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386

First issue I observe is that the server omnitruck-direct.chef.io does not exist. It should be omnitruckchef.io. How is this server determined? What can I do to fix this problem? TIA.

Upvotes: 1

Views: 360

Answers (1)

Mrigesh Priyadarshi
Mrigesh Priyadarshi

Reputation: 948

Looks like, you are running for EL 4, which chef doesn't support hence not available.

 ==> default: el 4 i386
 ==> default: Getting information for chef stable  for el...
 ==> default: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=4&m=i386

Check for EL 6, which exists

https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=6&m=i386

and EL 5, which also exists

https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=5&m=i386

Chef clients

https://downloads.chef.io/chef-client/redhat/

Upvotes: 1

Related Questions