Vagrant Error: Failed to connect to atlas.hashicorp.com

vagrantIn this article:

  • Solution to very common error while downloading VM through vagrant.

Problem:

While running command vagrant up, following error occurs-

C:\_vagrantwork\proj2>vagrant box add hashicorp/precise32 The box ‘hashicorp/precise32’ 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/hashicorp/precise32”
Error: Failed to connect to atlas.hashicorp.com port 1080: Timed out

Background:

  • This generally comes on corporate network due to proxy settings.

Solution:

     Step 1: Get proxy

  • For windows 7 or higher- Execute netsh winhttp show proxy.
  • Look for output under “Proxy Server(s)” it should be like <proxy_string>:<proxy_port>.
  • Copy the string.

    Step 2: Get the IP

  • Ping <proxy_string>
  • And copy the IP address (let’s say it proxy_ip)

    Step 3: Set variables (you may set it in environment variables area for permanent fix)

  • set HTTPS_PROXY=https://<proxy_ip>:<proxy_port>
  • set HTTP_PROXY=http://<proxy_ip>:<proxy_port>

    Step 4: Run your command

  • Issue vagrant command.

Happy Reading!!

Nirbhya Bhava!!

Advertisements

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s