Vagrant: Remote connection disconnect. Retrying... / Connection reset. Retrying...

Created on 1 Oct 2017  ยท  30Comments  ยท  Source: hashicorp/vagrant

Yesterday, I was able to boot FreeBSD with Vagrant. Today, with the exact same Vagrantfile, it stopped working. I destroyed my box and deleted the .vagrant directory, deleted the VirtualBox VM, and updated VirtualBox. No luck.

Trace

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'freebsd/FreeBSD-11.1-RELEASE'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'freebsd/FreeBSD-11.1-RELEASE' is up to date...
==> default: Setting the name of the VM: hello-docker-freebsd_default_1506876265951_32377
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (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: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
(and so on, forever)

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "freebsd/FreeBSD-11.1-RELEASE"

  config.vm.guest = :freebsd
  config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
  config.ssh.shell = "sh"
  config.vm.base_mac = "080027D14C66"

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--cpus", "1"]
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
    vb.customize ["modifyvm", :id, "--audio", "none"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
    vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
  end
end

I'm using Vagrant 2.0.0 with VirtualBox 5.1.28 on macOS Sierra.

communicatossh guesfreebsd hosdarwin waiting-reply

Most helpful comment

@briancain probably better to reopen this ticket, right?

All 30 comments

If you log into the guest via the virtualbox GUI, do you see any connection errors?

Hey there,

I am going to close this due to lack of response. If this is still occurring, please open a new issue and follow the provided issue template that appears when you click the "New Issue" button. This will help us in getting a reproduction and fix. Thanks!

I get this exact issue. Vagrant 1.9.5 and 2.0.1, Vbox 5.1.30 Windows 10. Not all boxes do it but I just created a new one and I was able to get into it once and now never. I destroyed and re-created it and same behavior. At one time the message eventually stopped and it did connect.

The machine does actually start up fine in the VBox gui. Vagrant just cant seem to find it.

same here on Ubuntu Linux 16.04

I am also experiencing this issue on Vagrant 2.0.1, VirtualBox 5.2.4 on macOS High Sierra 10.13.2. It seems if I control+C out , and then immediately re-try whatever I was doing (whether it's test-kitchen, etc) it is fine... I feel like there may be some kind of race condition waiting for the system to boostrap?

Have the same problem.
Guest OS: Windows 7 x86 Professional
Host: Windows 10 Enterprise
Vagrant 2.0.1
VirtualBox 5.2.6

Note: Hyper-V=disabled , Virtualization enabled in bios

I do not see any connection errors upon logging into guest vm using GUI

Same issue.
Host: macOS High Sierra
Guest: ubuntu/xenial64

Having the same issue.
Host: Win7 64Bit
Guest: ubuntu 16.04 (laravel homestead 5.1, tag v7.1.2 from their git repo)

Same here. After 20-30 sec of this
default: Warning: Remote connection disconnect. Retrying... default: Warning: Connection aborted. Retrying...
It finally ends successfully.
default: Machine booted and ready!
Still I'm sure there is weird problem here.

Guest: generic/ubuntu1710

Me too, on a fresh installation of VirtualBox on Windows 10 (v5.2.8), Vagrant (2.0.3) and Homestead (tag 7.3.0)

==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
    homestead-7: Warning: Connection reset. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Connection reset. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Remote connection disconnect. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
    homestead-7: Warning: Connection reset. Retrying...
    homestead-7: Warning: Connection aborted. Retrying...
==> homestead-7: Machine booted and ready!

No errors upon logging via VirtualBox GUI

VirtualBox > Settings > Network > Adapter 1 > Advanced > Cable Connected is checked
VirtualBox > Settings > Network > Adapter 2 > Advanced > Cable Connected is checked too

Intel Virtualization Technology is enabled on BIOS

Try vagrant plugin repair followed by vagrant plugin update

@yeongsheng-tan : thanks for your answer, just did what you suggested but the problem still persists
EDIT: wait! I did vagrant reload --provision and seems that problem went away! I try a couple of times and let you know if there's still any issue! Thanks :-)

One last thing you might try vagrant plugin expunge --reinstall

@yeongsheng-tan : it was a false alarm, it's always the same
I also tried vagrant plugin expunge --reinstall but that caused an issue with vagrant-winnfsd plugin

@ivansammartino I'm seeing the same issue with a centos/7 box on a ubuntu host. If I remove the additional interfaces in the Vagrantfile and just use the default interface used by vagrant I don't get the warnings.

I also have this issue, ubuntu/xenial box on Mac host. I have 2 NICs configured.
Adapter 1: NAT
Adapter 2: host-only with static IP

Also have this issue.
Any idea what could be causing it and how to get around this?

@briancain probably better to reopen this ticket, right?

Restarting my machine solved it for me.

Hello,
I'm having the same issue. Anyone had a luck in resolving this?

Same issue here. VirtualBox 5.2.18, Vagrant 2.1.2, bento/ubuntu-18.04 (201807.12.0).

==> 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 reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...

... for a couple of minutes before it finally connects.

Note that this only happens when setting a private network. I tried using DHCP and setting a static IP, same result.

VirtualBox Version: 5.2 Vagrant 2.1.5
image

After updating to macOs Mojave I had to update my Virtual box from 5.1 to 5.2 and now I face this problem too.

Desperate situations like these leaves me no option but to go with docker

I have the same problem just when setting a private network.
Virtualbox 5.2.22 r126460 (Qt5.6.2)
Vagrant 2.2.0
OS CentOS7 in vm.

By the way, everthing works fine after vagrant up, I'm able to use IP to connect to the host, and vagrant ssh works.

Had this issue too with virtualbox/bento Centos7.5/private network setup. Ended up building Bento and Boxcutter VMs locally and the problem went away. Still get couple warnings while machine boots, but not 20-30s failed tries like before. So i'm guessing something is off in cloud builds.

Why is this ticket closed? It's clearly not fixed.

Think I've been given a reason to finally make the jump to Docker...

@archy-bold this is off topic (and tbf I've got this issue with this specific box only), but yeah, I'm currently in the process of doing just that and so far I don't really see any reason to look back

In my case FreeBSD-12.0-RELEASE performs updating at the first boot. I had attached to the console via VirtualBox GUI, hit Ctrl+C and then the boot process ends and vagrant ssh succeeds.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spkane picture spkane  ยท  112Comments

dcarrith picture dcarrith  ยท  79Comments

p0deje picture p0deje  ยท  82Comments

sirn picture sirn  ยท  111Comments

crashev picture crashev  ยท  116Comments