Vagrant Connection Refused Error

2019-05-30 13:33发布

问题:

Virtual Box 4.3.14 Vagrant 1.6.3

and when I vagrant up I get this error

default: warning: connection refused. Retying...

it goes on and on until it gives up and says

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

I am on windows 7, I even tried running cmd on administrator mode same thing

I even tried vagrant reload as I read on on other web resources, still same thing, it outputs the same thing

I did not tweak my virtualbox after install, basically just install virtualbox and install vagrant then run vagrant up

and oh by the way my vagrantfile and provisioning script is from here

https://gist.github.com/JeffreyWay/9244801
https://gist.github.com/JeffreyWay/9244714

Been googling and unfurtunately I can't find clear answer

Tnx in advance

回答1:

It seems its a virtual box / vagrant version incompatibility issue

I uninstalled Virtual Box 4.3.14 and installed Virtual Box 4.3.12 and it worked. Basically I downgraded virtual box.

I hope this gets fixed soon.

Hope this helps anyone.



回答2:

Open your vagrantfile using notepad and edit it so that it looks like this:

Please tally your vagrantfile with this one word by word. Then open BIOS and turn on virtualisation. Watch this video to learn how to do it. It is a very short video.

PS: You may need to uninstall vagrant before doing this. And in your Users folder in C:, there will be a folder named .vagrant.d, please delete that as well before following these steps.

Uninstalling vagrant will require that you run your machine as administrator. You can right click on Command Prompt (search cmd in windows search box) and click run as administrator. Type the following command: net user administrator /active:yes You will get a message called command completed successfully. Now you can log off and see that there are two accounts, one of them is admin. You can log in from that and uninstall vagrant.