Vagrant up - 读错误

时间:2015-03-25 06:29:05

标签: vagrant virtualbox vagrantfile

为新项目安装vagrant时出现错误。当下载约{60}的virtualbox.box时,就会发生这种情况。

我该如何纠正?

我使用的是Ubuntu 14.04,Vagrant 1.7.2,Virtualbox 4.3.26

非常感谢任何帮助。

enter image description here

1 个答案:

答案 0 :(得分:1)

我似乎无法重现您的错误:

$ vagrant init migosm/debian-7.6-kernel-3.16
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'migosm/debian-7.6-kernel-3.16' could not be found. Attempting
to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'migosm/debian-7.6-kernel-3.16'
    default: URL: https://atlas.hashicorp.com/migosm/debian-7.6-kernel-3.16
==> default: Adding box 'migosm/debian-7.6-kernel-3.16' (v1.0.5) for provider: v
irtualbox
    default: Downloading: https://atlas.hashicorp.com/migosm/boxes/debian-7.6-ke
rnel-3.16/versions/1.0.5/providers/virtualbox.box
    default: Progress: 100% (Rate: 7909k/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'migosm/debian-7.6-kernel-3.16' (v1.0.5) for
 'virtualbox'!
==> default: Importing base box 'migosm/debian-7.6-kernel-3.16'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'migosm/debian-7.6-kernel-3.16' is up to date...
==> default: Setting the name of the VM: SO_test_default_1427480182231_55057
==> default: Fixed port collision for 22 => 2222. Now on port 2203.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2203 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2203
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/HashiCorp/Vagrant/SO_test
$ vagrant ssh
Linux packer-debian-7 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x8
6_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jan  4 16:49:00 2015 from 10.0.2.2
vagrant@packer-debian-7:~$

This answer关于同一SSL错误的问题表明错误消息告诉您主机因某种原因强行关闭连接。这可能是因为Atlas服务器在您尝试它并开始断开连接时遇到了负载问题。或者,您的连接可能已运行太长时间,并且已被Web服务器强行关闭。

在这种情况下,您最好使用下载管理器并直接下载文件夹,然后使用vagrant box add [box file path]来使用该框。这确实意味着您无法及时了解Atlas服务器上框的任何更改,否则应该没问题。