Vagrant Warning: Connection refused. Retrying

Ben picture Ben · Sep 3, 2015 · Viewed 14.4k times · Source

Testing default example

$ vagrant init hashicorp/precise32
$ vagrant up

My box:

I know this is common error but after trying everything I still cannot make it work Getting error

While VM shows: enter image description here

And I can log in successfully: enter image description here

Firewall / Antivirus turned off.

Hyper-V is not installed
enter image description here

I have tried connecting via putty to 127.0.0.1 2222 enter image description here

EDIT: enter image description here

enter image description here

Vagrantfile (I have removed commented out lines)

Vagrant.configure(2) do |config|
    config.vm.box = "hashicorp/precise32"
end

This is what vagrant ssh does... nothing. And vagrant reload stuck on same issue. enter image description here

Answer

GHETTO.CHiLD picture GHETTO.CHiLD · Sep 3, 2015

This happens with Vagrant from time to time with the first spin up. After it does that it will timeout and drop you back at the prompt, go vagrant ssh, it will let you in. If it does not go vagrant reload and it will restart the vm. This occurs because the vagrant images have dns turned off so it takes a while to resolve the connection. Again, this sometimes occurs on the first up after you download it and spin it up.