Vagrant 警告:连接被拒绝.重试 [英] Vagrant Warning: Connection refused. Retrying
问题描述
测试默认示例
$ vagrant init hashicorp/precise32$无业游民
我的盒子:
- Windows 8.1
- VirtualBox 5.0.2
- 流浪者 1.7.4
- 英特尔 i7-4700MQ CPU 似乎具有英特尔® 虚拟化技术 (VT-x)
虽然虚拟机显示:
然后我就可以登录成功了:
防火墙/防病毒已关闭.
未安装 Hyper-V
我尝试通过腻子连接到 127.0.0.1 2222
Vagrantfile(我已经删除了注释掉的行)
Vagrant.configure(2) 做 |config|config.vm.box = "hashicorp/precise32"结尾
这就是 vagrant ssh 所做的……什么都没有.和流浪者重装卡在同样的问题上.
解决方案Vagrant 在第一次启动时不时发生这种情况.这样做之后它会超时并让你回到提示处,去
vagrant ssh
,它会让你进入.如果它不去vagrant reload
,它会重新启动虚拟机.发生这种情况是因为 vagrant 图像已关闭 dns,因此需要一段时间来解析连接.同样,这有时会在您下载并启动后第一次启动时发生.Testing default example
$ vagrant init hashicorp/precise32 $ vagrant up
My box:
- Windows 8.1
- VirtualBox 5.0.2
- Vagrant 1.7.4
- Intel i7-4700MQ CPU witch seems to have Intel® Virtualization Technology (VT-x) http://ark.intel.com/products/75117/Intel-Core-i7-4700MQ-Processor-6M-Cache-up-to-3_40-GHz
I know this is common error but after trying everything I still cannot make it work
While VM shows:
And I can log in successfully:
Firewall / Antivirus turned off.
Hyper-V is not installed
I have tried connecting via putty to 127.0.0.1 2222
EDIT:
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.
解决方案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 govagrant 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.这篇关于Vagrant 警告:连接被拒绝.重试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!