Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 machines cannot download hashicorp/precise64 box #3586

Closed
pidah opened this issue Apr 30, 2014 · 22 comments
Closed

Windows 7 machines cannot download hashicorp/precise64 box #3586

pidah opened this issue Apr 30, 2014 · 22 comments

Comments

@pidah
Copy link

pidah commented Apr 30, 2014

Attempts to download the hashicorp/precise64 box fails on windows 7 running vagrant 1.5.4 with the following error:

C:\Users\xxxx\Documents\GitHub\opg-backoffice-deploy>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise64' could not be found. Attempting to find an
d install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on Vagrant Cloud, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://vagrantcloud.com/hashicorp/precise64"]
Error: Failed connect to vagrantcloud.com:443; No error

This works fine on on Ubuntu 12.04 and Mac OSX 10.9.2

To reproduce on a windows system, run the following 2 commands in an empty directory:

vagrant init hashicorp/precise64

vagrant up

Thanks

@mitchellh
Copy link
Contributor

I actually work on Windows and don't have this issue. Also, I click that link and it works just fine. Please check your firewall and network settings to make sure you can access the website.

@steveo250k
Copy link

I'm having the same problem. I can reach the URL via web browser. Vagrant cannot. I am behind a corporate firewall. I'm having trouble finding a solution for setting Vagrant to work with our firewall.

@kikitux
Copy link
Contributor

kikitux commented Sep 4, 2014

@steveo250k did you try to setup the proxy on the command line ?

@steveo250k
Copy link

I don't think so, but you gave me some more keywords to search on. I found this:
c:\Applications\Vagrant\precise64>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.1.0, system)

and notice there is no vagrant-proxyconf plugin which I assume I need.

So I ran:
c:\Applications\Vagrant\precise64>vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http/response.rb:119:in error!': 405 "Method Not Allowed" (Net::HTTPServerException) from C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http/response.rb:128:invalue'
from C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:913:in connect' from C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:indo_start'
from C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:in start' from C:/Applications/Vagrant/embedded/lib/ruby/2.0.0/rubygems/remote_fetcher.rb:415:inconnection_for'

So now the question is why can't I install vagrant-proxyconf?

@steveo250k
Copy link

Update:
I had HTTP_PROXY and HTTPS_PROXY configured wrong. With the correct configuration I am able to install the vagrant-proxyconf
c:\Applications\Vagrant>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-proxyconf (1.3.2)
vagrant-share (1.1.1, system)

This also means I'm able to connect to the internet via vagrant. But I'm still getting this error:
c:\Applications\Vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise32' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on Vagrant Cloud, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://vagrantcloud.com/hashicorp/precise32"]
Error: Could not resolve host: (nil); Host not found

@kikitux
Copy link
Contributor

kikitux commented Sep 5, 2014

if those are environment variable can you try to set:

export http_proxy=
export https_proxy=
export HTTP_PROXY=
export HTTPS_PROXY=

and also try

vagrant box add hashicorp/precise32

On Fri, Sep 5, 2014 at 12:44 AM, steveo250k notifications@github.com
wrote:

Update:
I had HTTP_PROXY and HTTPS_PROXY configured wrong. With the correct
configuration I am able to install the vagrant-proxyconf
c:\Applications\Vagrant>vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-proxyconf (1.3.2)
vagrant-share (1.1.1, system)

This also means I'm able to connect to the internet via vagrant. But I'm
still getting this error:
c:\Applications\Vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise32' could not be found. Attempting to
find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on Vagrant Cloud, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://vagrantcloud.com/hashicorp/precise32"]
Error: Could not resolve host: (nil); Host not found


Reply to this email directly or view it on GitHub
#3586 (comment).

@stevebutler-hsdg
Copy link

Running vagrant in a CMD terminal on Windows 7, I had the same problem with a corporate proxy. I set both HTTP_PROXY and HTTPS_PROXY, and then "vagrant box add ubuntu/trusty64" was successful.

@kaushalsingh861
Copy link

i had also this error
Error: Failed connect to atlas.hashicorp.com:443; No error
I just ran the CMD as administrator after setting HTTP proxy and it worked for me

@sundarsrd
Copy link

Had the same issue;
figured out the exact issue (in correct proxy) by using --debug option.

in my case adding the port explicitly to the HTTP_PROXY/HTTPS_PROXY worked.
ex: set http_proxy=http://192.168.x.x:80

@rajagopalan
Copy link

i am having the same issue. I was able to download the precise64,box from my corporate desktop, but my vagrant comand fails. i had setup the http_proxy as HTTP_PROXY'"http://hproxy.hh.local:3128" in system variables in a windows 7 machine.

@ghost
Copy link

ghost commented Dec 4, 2015

I was facing the same issue in Windows 8.

C:\Users\workspace\bosh-lite>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'cloudfoundry/bosh-lite' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: 9000.69.0
The box 'cloudfoundry/bosh-lite' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/cloudfoundry/bosh-lite"]
Error: Failed connect to atlas.hashicorp.com:443; No error

setting the http_proxy and https_proxy from command line fixed the issue.

C:\Users\workspace\bosh-lite>set http_proxy=http://[corporate proxy]:8080

C:\Users\workspace\bosh-lite>set https_proxy=http://[corporate proxy]:8080

@pssayi
Copy link

pssayi commented Feb 18, 2016

Same case for me , the HTTP / HTTPS proxy setting worked.
From the command line do set HTTP_PROXY= and set HTTPS_PROXY=

@MartinGacheru
Copy link

how do you set port? via command git

@thesamarkand
Copy link

SOLUTION FOR USERS WITH DIRECT CONNECTION TO INTERNET:

Go to Mu$tdie firewall settings, add allowing rules for:
C:\HashiCorp\Vagrant\embedded\bin\curl.exe
C:\HashiCorp\Vagrant\bin\vagrant.exe

@srinivasreddy
Copy link

You can download the box file and add it locally . That also works.

@sanjeevlsg
Copy link

hello reddy can you send me details on local download and get vagrant up. Thanks

@sanjeevlsg
Copy link

error message Bringing machine 'oob-mgmt-server' up with 'virtualbox' provider...
==> oob-mgmt-server: Box 'CumulusCommunity/vx_oob_server' could not be found. Attempting to find and install...
oob-mgmt-server: Box Provider: virtualbox
oob-mgmt-server: Box Version: 1.0.4
The box 'CumulusCommunity/vx_oob_server' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://vagrantcloud.com/CumulusCommunity/vx_oob_server"]

@fide1
Copy link

fide1 commented Apr 20, 2018

@ByteJuggler
Copy link

ByteJuggler commented Nov 2, 2018

For reference and what it's worth:

I've today run into this same issue. The issue is basically that that there seems to be some inconsistency in respect of the proxy environment variables used/supported by different vagrant sub-commands. Some support lower case while some require upper case only.

To reiterate, some vagrant commands/subcommands require the capitalized HTTP_PROXY variables to be set while others work with the lower case versions. This seems at the very least surprising and arguably less than friendly behaviour.

Background: I'm reinstalling vagrant today on my PC. During the setup I set the http_proxy and https_proxy variables in order to enable me to successfully run "vagrant plugin repair" and "vagrant login".

However following this, running "vagrant box add ...." still failed with:

Error: Failed to connect to vagrantcloud.com port 443: Timed out

I then searched and found this issue, from which I got the idea to also set the capitalized environment varaibles e.g. HTTP_PROXY and HTTPS_PROXY. After doing so the "vagrant box add ..." command started working as expected.

Obviously it would be better if all the vagrant command supported both lower and uppercase environment variables.

@himagarg
Copy link

Facing same issue, ran below command and its working fine
set https_proxy=http://username:password@URL

@khayapro
Copy link

Make sure that your corporate proxy is set as follows:
set HTTP_PROXY=http://username:password@proxy:8080
set HTTPS_PROXY=http://username:password@proxy:8080

Note: Dont put 's' in your HTTPS_PROXY variable value
The above worked for me.

@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests