Vagrant Box Bento Metadata for this box cannot be found

Getting Bento box not found on vagrant box update (vagrant version 2.0.2):

INFO downloader: Downloader starting download: 
 INFO downloader:   -- Source: https://atlas.hashicorp.com/bento/ubuntu-16.04
 INFO downloader:   -- Destination: /var/folders/_4/g8fn6chn46g9v058h8k4pzpw0000gn/T/vagrant-load-metadata20180205-43401-1tc9uqd
 INFO subprocess: Starting process: ["/usr/local/bin/curl", "-q", "--fail", "--location", "--max-redirs", "10", "--user-agent", "Vagrant/2.0.2 (+https://www.vagrantup.com; ruby2.4.3)", "-H", "Accept: application/json", "--output", "/var/folders/_4/g8fn6chn46g9v058h8k4pzpw0000gn/T/vagrant-load-metadata20180205-43401-1tc9uqd", "https://atlas.hashicorp.com/bento/ubuntu-16.04"]
DEBUG subprocess: Command not in installer, not touching env vars.
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0 
DEBUG subprocess: stderr:      0 --:--:--  0:00:01 --:--:--     0
DEBUG subprocess: stderr: curl: (22) The requested URL returned error: 404 Not Found
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
DEBUG subprocess: Exit status: 22
 WARN downloader: Downloader exit code: 22
ERROR downloader: Exit code: 22
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x00000001013ec400>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::BoxMetadataDownloadError: There was an error while downloading the metadata for this box.
The error message is shown below:

The requested URL returned error: 404 Not Found>
ERROR vagrant: There was an error while downloading the metadata for this box.
The error message is shown below:

The requested URL returned error: 404 Not Found
ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/box.rb:135:in `rescue in load_metadata'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/box.rb:139:in `load_metadata'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/box.rb:160:in `has_update?'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/update.rb:137:in `box_update'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/update.rb:127:in `block in update_vms'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/update.rb:116:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/update.rb:116:in `update_vms'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/update.rb:49:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/plugins/commands/box/command/root.rb:66:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/cli.rb:46:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/environment.rb:269:in `cli'
/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/bin/vagrant:151:in `<main>'
 INFO interface: error: There was an error while downloading the metadata for this box.
The error message is shown below:

The requested URL returned error: 404 Not Found
There was an error while downloading the metadata for this box.
The error message is shown below:

The requested URL returned error: 404 Not Found
 INFO interface: Machine: error-exit ["Vagrant::Errors::BoxMet

Doing a sudo rm -rf /opt/vagrant/embedded/bin/curl did not help either… Did see that end of June all these boxes like Bento will be moved to app.vagrantup.com, but I am not sure why I am having 404s now then…

Well in the end I added Trellis as upstream, rebased (which was a pain) getting the latest merged in my Trellis repo. Then I provisioned again using vagrant box provision. When I then did a vagrant box update I was told there was none so I did a vagrant box add bento/ubuntu-16.04 post rm -rf ~/.vagrant.d:

 vagrant box add bento/ubuntu-16.04
==> box: Loading metadata for box 'bento/ubuntu-16.04'
    box: URL: https://vagrantcloud.com/bento/ubuntu-16.04
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) parallels
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'bento/ubuntu-16.04' (v201801.02.0) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/bento/boxes/ubuntu-16.04/versions/201801.02.0/providers/virtualbox.box

I think this has solved my 404 so will close this thread now

1 Like

This is the issue opened on the vagrant repository. There’s a nice workaround to solve the problem editing the metadata_url file. Hope that could help more people with this issue.

2 Likes