流浪者停留在 "default: Warning: Connection timeout. Retrying..."
vagrant stuck at "default: Warning: Connection timeout. Retrying..."
我用谷歌搜索了几天,但没有找到解决我问题的方法。
我很确定,这个问题不是来自 VT-x,因为我在 Windows 8.1 上使用 bento/ubuntu-14.04-i386(我猜我的 CPU 允许使用 32 位作为访客但 64 位不支持 C2D E7200)
我从 laravel/settler 克隆 github 存储库并将 config.vm.box = 'bento/ubuntu-14.04'
替换为 config.vm.box = 'bento/ubuntu-14.04-i386'
Vagrantfile
然后用 vagrant up
开始流浪,我明白了
λ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-14.04-i386'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-14.04-i386' is up to date...
==> default: Setting the name of the VM: settler_default_1446635664316_42330
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 35729 => 35729 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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.
vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile C:/Users/Jame/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
vagrant global-status
id name provider state directory
------------------------------------------------------------------------------------------
87ba96c default virtualbox running C:/Users/Jame/Dropbox/Private/myscript/config/settler
The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"
GUI 是
请帮忙,谢谢:)
这可能有多种原因,主要是关于私钥/public 密钥。您可以按照以下步骤进行故障排除:
1) 首先尝试是否可以使用密码进行 ssh 以确保它与密钥有关。如果你不能,那么你应该首先找到原因,第 3 步在这种情况下也会有所帮助。
2) 第二件事是找出 vagrant 使用的是哪个私钥。
运行 vagrant ssh-config
并检查 IdentityFile
,在您的情况下,这是 vagrant 提供的默认值 insecure_private_key
。
3) 现在 运行 vagrant ssh -- -v
将向您显示 ssh 进度的详细信息,仔细检查所使用的私钥。如果你看到 smt。最后像这样,您可以确定服务器无法匹配您的 public 密钥,这就是问题所在:
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/ozan/.vagrant.d/insecure_private_key
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
vagrant@127.0.0.1's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
vagrant@127.0.0.1's password:
4) 使用密码 ssh 来宾并检查 public 密钥是否正常。您应该检查 ~/.ssh
目录和 /.ssh/authorized_keys
文件的权限。它们必须分别为 755 (drwx------) 和 600 (-rw--------),并且必须由 vagrant
用户拥有。
5) 检查 public 密钥是否与您的私钥匹配。为此,在您的主机上从 ssh-keygen -f ~/.vagrant.d/insecure_private_key -y
等私钥生成 public 密钥,并将其与 ~/.ssh/authorized_keys
中的私钥进行比较
同时确保 ~/.ssh/authorized_keys
中的键在同一行上,如果你使用 smt。就像复制粘贴一样,可能会插入换行符,这显然会破坏 public 键。
下面是一些关于 vagrant 和 homestead 的注释,它们会有所帮助:
通常 vagrant 会用一些安全的 insecure_private_key
替换这个 insecure_private_key
并在启动或停止时调整所有内容,如果 config.ssh.insert_key
在您的配置中设置为 true
(这是最新版本中的默认设置) 1.7.4 版)。因此,您可能会在 IdentityFile
的 .vagrant
目录下看到一些路径。
我的问题是,您通常可以在 Homestead.yaml
中定义要使用的私钥,但是 homestead 出于某种原因不遵守自定义密钥,并且 vagrant 没有替换不安全的钥匙也...
所以我基本上生成并复制了 IdentityFile
列出的私钥的 public 密钥并将其放入 authorized_keys
中,这确实解决了问题。
修复 public 密钥后,我意识到 vagrant 成功地用一些安全的密钥替换了 insecure_private_key
...
我用谷歌搜索了几天,但没有找到解决我问题的方法。
我很确定,这个问题不是来自 VT-x,因为我在 Windows 8.1 上使用 bento/ubuntu-14.04-i386(我猜我的 CPU 允许使用 32 位作为访客但 64 位不支持 C2D E7200)
我从 laravel/settler 克隆 github 存储库并将 config.vm.box = 'bento/ubuntu-14.04'
替换为 config.vm.box = 'bento/ubuntu-14.04-i386'
Vagrantfile
然后用 vagrant up
开始流浪,我明白了
λ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-14.04-i386'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-14.04-i386' is up to date...
==> default: Setting the name of the VM: settler_default_1446635664316_42330
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 35729 => 35729 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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.
vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile C:/Users/Jame/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
vagrant global-status
id name provider state directory
------------------------------------------------------------------------------------------
87ba96c default virtualbox running C:/Users/Jame/Dropbox/Private/myscript/config/settler
The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"
GUI 是
请帮忙,谢谢:)
这可能有多种原因,主要是关于私钥/public 密钥。您可以按照以下步骤进行故障排除:
1) 首先尝试是否可以使用密码进行 ssh 以确保它与密钥有关。如果你不能,那么你应该首先找到原因,第 3 步在这种情况下也会有所帮助。
2) 第二件事是找出 vagrant 使用的是哪个私钥。
运行 vagrant ssh-config
并检查 IdentityFile
,在您的情况下,这是 vagrant 提供的默认值 insecure_private_key
。
3) 现在 运行 vagrant ssh -- -v
将向您显示 ssh 进度的详细信息,仔细检查所使用的私钥。如果你看到 smt。最后像这样,您可以确定服务器无法匹配您的 public 密钥,这就是问题所在:
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/ozan/.vagrant.d/insecure_private_key
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
vagrant@127.0.0.1's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
vagrant@127.0.0.1's password:
4) 使用密码 ssh 来宾并检查 public 密钥是否正常。您应该检查 ~/.ssh
目录和 /.ssh/authorized_keys
文件的权限。它们必须分别为 755 (drwx------) 和 600 (-rw--------),并且必须由 vagrant
用户拥有。
5) 检查 public 密钥是否与您的私钥匹配。为此,在您的主机上从 ssh-keygen -f ~/.vagrant.d/insecure_private_key -y
等私钥生成 public 密钥,并将其与 ~/.ssh/authorized_keys
同时确保 ~/.ssh/authorized_keys
中的键在同一行上,如果你使用 smt。就像复制粘贴一样,可能会插入换行符,这显然会破坏 public 键。
下面是一些关于 vagrant 和 homestead 的注释,它们会有所帮助:
通常 vagrant 会用一些安全的 insecure_private_key
替换这个 insecure_private_key
并在启动或停止时调整所有内容,如果 config.ssh.insert_key
在您的配置中设置为 true
(这是最新版本中的默认设置) 1.7.4 版)。因此,您可能会在 IdentityFile
的 .vagrant
目录下看到一些路径。
我的问题是,您通常可以在 Homestead.yaml
中定义要使用的私钥,但是 homestead 出于某种原因不遵守自定义密钥,并且 vagrant 没有替换不安全的钥匙也...
所以我基本上生成并复制了 IdentityFile
列出的私钥的 public 密钥并将其放入 authorized_keys
中,这确实解决了问题。
修复 public 密钥后,我意识到 vagrant 成功地用一些安全的密钥替换了 insecure_private_key
...