Remote connection disconnect. Retrying... on a Ubuntu guest and Windows 7 host

5,466 views
Skip to first unread message

adit...@gmail.com

unread,
Feb 6, 2015, 7:33:56 PM2/6/15
to vagra...@googlegroups.com
This is my first Vagrant box. I have Vagrant 1.7.2 and Virtualbox 4.3.20 on a Windows 7 host.

I used a bitnami box to build my vm without x windows. I followed instructions from this link - https://github.com/hollodotme/Helpers/blob/master/Tutorials/vagrant/self-hosted-vagrant-boxes-with-versioning.md - to prepare for creating the vagrant box.

I did a vagrant up and I keep getting 'Remote connection disconnect.' I hit ctrl+c and did a 'vagrant halt'. I booted up the new vm from virtualbox directly. It gets me to the login prompt. I tried 'vagrant ssh' and I get this error: 'ssh_exchange_identification: read: The connection was aborted'.

I did a 'vagrant destroy and started over. I edited the Vagrantfile to allow GUI to be visible. I am able to get to get to the login prompt in the VBox UI and I still get the 'Remote connection disconnect' on the console.

After this, I upgraded to Vagrant 1.7.2 and the issue is still there.

I found other forum posts in this group about the same error message, but none of them seem to have the exact same problem. 

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'dashing_bitnami'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: VagrantTest_default_1423268267150_49487

==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> 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: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...

Alvaro Miranda Aguilera

unread,
Feb 7, 2015, 6:11:06 PM2/7/15
to vagra...@googlegroups.com
Hello, on that new box try this:

First . A.

login from the gui
become root, sudo su -

go to /etc/udev/rules.d

do an ls

if there is any 70-persistent-net.rule or similar delete it

Then B.

if the OS is centos or rpm based, try this

cd /etc/sysconfig/network-scripts/
edit ifcfg-eth0 or ifcfg-em0

if there is anything like MACADDR or UUID delete those lines

If the directory doesn't exist, skip this part

reboot and try again

If that fix the issue, you need to do that manually before packing the box.

Alvaro.
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Aditya Inapurapu

unread,
Feb 8, 2015, 12:32:53 AM2/8/15
to vagra...@googlegroups.com
Alvaro,
Thank you for looking into this. It is a Ubuntu VM, so option B is not possible. 

Option A - There is a README file and a 60-vboxadd.rules file in /etc/udev/rules.d. 


Thank you.
Aditya.

You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/bviqvAtHXbw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
Feb 8, 2015, 2:43:31 AM2/8/15
to vagra...@googlegroups.com
On Sun, Feb 8, 2015 at 6:32 PM, Aditya Inapurapu <adit...@gmail.com> wrote:
> https://github.com/hollodotme/Helpers/blob/master/Tutorials/vagrant/self-hosted-vagrant-boxes-with-versioning.md

can you share the box? copy it to dropbox, and share a link... or any
other way you can find to share it.

Aditya Inapurapu

unread,
Feb 15, 2015, 5:43:41 PM2/15/15
to vagra...@googlegroups.com
Alvaro,
I cannot upload this box to any location. This is on my work machine. I did something to reproduce the problem on a different VM.

From a folder named: BASEBOX
1. vagrant init hashicorp/precise64
2. vagrant up (the console showed that a new private key was created)
3. vagrant halt
4. Rename the BASEBOX_default... vm name to BASEBOX
3. vagrant package --base BASEBOX --output ./BASEBOX.box
4. vagrant box add BASEBOX BASEBOX.box

From another folder named BASEBOX1
1. vagrant init BASEBOX
2. vagrant up
3. The same error shows up.

Is this a bug in Vagrant?

Thank you,
Aditya.

Alvaro Miranda Aguilera

unread,
Feb 25, 2015, 5:42:42 PM2/25/15
to vagra...@googlegroups.com
Sorry for the delay

did you manage to solve this?

before the package of box, check if there are files like
/etc/udev/rules.d/70-persistent-net.rules

Those cause issues if not removed before packaging.

Alvaro.
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an

adit...@gmail.com

unread,
Mar 27, 2015, 4:14:47 PM3/27/15
to vagra...@googlegroups.com
Thank you for responding. I have the following .rules files. I am not sure which ones I should delete.

/etc/udev/rules.d/98-kexec.rules
/etc/udev/rules.d/60-vboxadd.rules

There are other rules files in other folders.
/etc/audit/rules.d/audit.rules
/etc/audit/audit.rules
/etc/polkit-1/rules.d/50-default.rules
/etc/polkit-1/rules.d/49-polkit-pkla-compat.rules

Alvaro Miranda Aguilera

unread,
Mar 27, 2015, 5:37:39 PM3/27/15
to vagra...@googlegroups.com
On Sat, Mar 28, 2015 at 9:14 AM, <adit...@gmail.com> wrote:
>> /etc/udev/rules.d/70-persistent-net.rules

HEllo

just /etc/udev/rules.d/70-persistent-net.rules if exist. if doesn't all good

I script this like this

[ -f /etc/udev/rules.d/70-persistent-net.rules ] && rm -fr
/etc/udev/rules.d/70-persistent-net.rules

Alvaro

Francisco Quintero

unread,
Apr 7, 2015, 3:56:37 PM4/7/15
to vagra...@googlegroups.com
I had this issue before with every box I use. Solved it issuing vagrant destroy and then vagrant up.

Vagrant detroy cleans all proceses related to the virtual machine. At first I thought it would delete my vm.box image but it didn't.

Alvaro Miranda Aguilera

unread,
Apr 7, 2015, 7:19:27 PM4/7/15
to vagra...@googlegroups.com
Hello Francisco,

Vagrant guest is created in a two step task

first step, download the base box,
second step, create the guest from the base box.

if you do this manually, the commands are like this:

vagrant box add user/box
vagrant up

the first step will download the box, and put it on the
HOME/.vagrant.d/boxes/<somwhere>
and the second will use this base box to create the end guest.




Vagrant is also smart, if the first time you do a vagrant box, it will
download the box, and save it on the boxes folder, and then create the
guest from the template

this is why, after a vagrant destroy just the guest, and not the base
box is deleted.


vagrant box list
vagrant box -h

are the commands that apply on boxes, so there is how to delete old
boxes when you want to do it.

hope this clarify the part of boxes/destroy

Alvaro
Reply all
Reply to author
Forward
0 new messages