Windows 10
Virtualbox 5.0.12
With Vagrant 1.8.1 i experience a "404 Not Found" error when performing a vagrant box update and it finds a newer version of the box.
When i uninstall and reinstall Vagrant 1.7.4 i no longer experience a "404 Not Found" error, and box downloads fine.
I am hosting the box myself in collaboration with atlas (for versioning), by adding a virtualbox provider and using the "URL" field. I then use VPN to gain access to the box at the specified URL.
I have also checked that i am logged in to atlas:
vagrant login --check
You are already logged in.
Debug log: https://gist.github.com/stefanaj/db63572bc14d232c8819
Performing installs of Microsoft Visual C++ Redistributable, as described in #6754 has not helped either.
FWIW, also seeing this with Vagrant 1.8.1 on OS X. Trying to download our private box hosted on Atlas leads to a 404:
$ vagrant login -c
You are already logged in.
$ vagrant box update
==> default: Checking for updates to 'BOX_NAME'
default: Latest installed version: 0.8.6
default: Version constraints:
default: Provider: vmware_desktop
==> default: Updating 'BOX_NAME' with provider 'vmware_desktop' from version
==> default: '0.8.6' to '0.8.7'...
==> default: Loading metadata for box 'https://atlas.hashicorp.com/BOX_NAME?access_token=ACCESS_TOKEN'
==> default: Adding box 'BOX_NAME' (v0.8.7) for provider: vmware_desktop
default: Downloading: https://atlas.hashicorp.com/BOX_NAME/versions/0.8.7/providers/vmware_desktop.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The requested URL returned error: 404 Not Found
I am also seeing the exact same error, OS X/Vagrant 1.8.1. Downgrading to Vagrant 1.7.4 eliminates the error.
Same here with Windows 10 fresh install as of today, VirtualBox 5.0.12 r104815, Vagrant 1.8.1
I tried adding the box directly, but I got this:
SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
I thought perhaps SSL certificates with the problem, so I tried with --insecure but had the same 404.
Managed to add the box directly in the end:
vagrant box add --provider virtualbox --box-version 0.0.11 --insecure https://atlas.hashicorp.com/xxx/boxes/xxx
I confirm that myself and a few other coworkers are experiencing this issue on 1.8.1. Downgrading to 1.7.4 works.
Same here... 404 when trying to update private box... v1.8.1
I tried @jamieburchell 's solution on Ubuntu 14.04, vagrant v1.8.1, but I'm still getting the 404. Going to the link manually downloads the box properly.
I'm having the same issue. I've found that removing the existing box (vagrant box remove BOXNAME) and allowing vagrant up to pull down the latest box works fine.
At least for me, it's only vagrant box update BOXNAME that has the issue.
I tried caseylang's workaround and was able to update successfully. Steps:
1) vagrant box remove MYBOX
2) vagrant box add MYBOX
Same issue here.
Vagrant version: 1.8.1 on Linux Mint 17.2 (Rafaela)
Same issue here.
Vagrant version: 1.8.1 on OS El Capitán (10.11.2)
I can confirm that vagrant box remove foo/bar followed by a vagrant up works.
Same issue.
vagrant remove box/name
vagrant up
Worked for me as well.
Same here. Osx 10.11.3
Vagrant 1.8.1
Experiencing the same on Windows 7.
Confirm that the vagrant box remove workaround resolved.
You don't need to remove the box to workaround the issue. You can just run vagrant box add box/name and this will force a download of the latest version or error if the box version you have is the latest.
Same here, running Ubuntu 14.04LTS with Vagrant 1.8.1.
Same problem with Vagrant 1.8.1 and OSX El Capitan
I am having the same problem ... using Atlas to store the boxes we create with packer and the boxes are private.
At first I thought that my access token had gone stale or rotated (since I use 2FA I can't login with vagrant login) so I re-generated an access token for my user and added it to the ENV as ATLAS_TOKEN ... however none of the tokens that vagrant spits out in the URL when loading the metadata corresponds to that one.
$ vagrant box update
==> default: Checking for updates to 'xxx/yyy'
default: Latest installed version: 9
default: Version constraints:
default: Provider: vmware_desktop
==> default: Updating 'xxx/yyy' with provider 'vmware_desktop' from version
==> default: '9' to '11'...
==> default: Loading metadata for box 'https://atlas.hashicorp.com/xxx/yyy?access_token=[redacted_token1]&access_token=[redacted_token1]&access_token=[redacted_token1]&access_token=[redacted_token1]&access_token=[redacted_token2]&access_token=[redacted_token2]&access_token=[redacted_token3]&access_token=[redacted_token3]'
==> default: Adding box 'xxx/yyy' (v11) for provider: vmware_desktop
default: Downloading: https://atlas.hashicorp.com/xxx/boxes/yyy/versions/11/providers/vmware_desktop.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The requested URL returned error: 404 Not Found
I have then followed what @paulbeattie mentioned above, vagrant add box xxx/yyy and that seems to work ...
Maybe this will help: if I paste the URL of the box in Firefox, it will prompt me to download it, but if I try to download it with wget, it will return 404. PS: using Ubuntu 14.04 LTS.
Edit: nevermind: if I pass the access token with the url to wget, it works just fine. And I supposed I was already logged in on Firefox.
My workaround:
vagrant box add your_box_name
If there is a new version it will be downloaded. This action will not remove old boxes, if you need to roll back.
Same issue here (Vagrant 1.8.1 / OSX 10.11.3)
Same issue
OS X 10.11.3
Vagrant 1.8.1
Hello,
It's seems there is a bug with vagrant box update + authentication ( vagrant login or ATLAS_TOKEN)
on first run it will download the box, so it does fine.
on second run, it seems the access_token is not being added properly to the curl line
INFO subprocess: Starting process: ["/opt/vagrant/embedded/bin/curl", "-q", "--fail", "--location", "--max-redirs", "10", "--user-agent", "Vagrant/1.8.1 (+https://www.vagrantup.com; ruby2.2.3)", "--continue-at", "-", "--output", "/Users/someusername/.vagrant.d/tmp/boxec107b5bdcd1889df5c82ffd99cf776e2364e621", "https://atlas.hashicorp.com/someorgname/boxes/someboxname/versions/0.109/providers/vmware_desktop.box"]
^ access_token is missed
Same issue. Can't download the new box built with packer on Atlas. vagrant box add foo/bar gives the same 404 error. Any workarounds?
@iroller yes, remove it first vagrant box remove -f foo/bar --all then add it back vagrant box add foo/bar if this doesn't work, just run vagrant up
@valentin-nasta, it doesn't work for me. It was never added to Vagrant since it's a new box.
$ vagrant login --check
You are already logged in.
$ vagrant box remove -f 'ak/ubuntu-trusty' --all
The box you requested to be removed could not be found. No
boxes named 'ak/ubuntu-trusty' could be found.
$ vagrant box add 'ak/ubuntu-trusty'
...
The requested URL returned error: 404 Not Found
$ vagrant up
...
default: Downloading: https://atlas.hashicorp.com/my-user/boxes/my-box/versions/0.2/providers/vmware_fusion.box
...
The requested URL returned error: 404 Not Found
ping @mitchellh
Hi @ThePixelDeveloper
Thank you for your comment. Please try to avoid pinging the maintainers without reviewing the conversation. There is an open PR (#7158) and it is waiting review. Thanks! :smile:
@sethvargo is there any update on this? thanks
Hi @eiser82
There is an open PR waiting for review.
In your Vagrantfile file add the line below as the first uncommented line
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
Followed by
vagrant up
This worked for me
Root cause: Vagrant has moved their images to https://vagrantcloud.com
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
You don't need to remove the box to workaround the issue. You can just run vagrant box add box/name and this will force a download of the latest version or error if the box version you have is the latest.