default: Warning: Remote connection disconnect. Retrying - vagrant

When I run vagrant up, I get:
D:\GitHub\website\rails-dev-box>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 3000 => 1234 (adapter 1)
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...
default: Warning: Remote connection disconnect. Retrying...
This warning will be for ever ..
What I've noticed is that if I started the VM manually ( without vagrant ) it will work without any delay, but only If I enabled Adapter 2 at VM settings like this:
How can I enable Adapter 2 of VM when using vagrant up ?
EDIT
Vagrantfile is:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# config.vm.network :hostonly, "192.168.50.4"
end
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty32'
config.vm.hostname = 'rails-dev-box'
# config.vm.synced_folder ".", "/vagrant/web" #, type: "nfs"
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
config.vm.boot_timeout = 120
# config.winnfsd.uid = 1
# config.winnfsd.gid = 1
config.vm.network :forwarded_port, guest: 3000, host: 1234
config.vm.provision :shell, path: 'bootstrap.sh', keep_color: true
end

For me it turned out that patience was the answer.
I was getting the message (I got it 12 times) but I waited a couple of minutes and then it succeeded.
When you say "this warning will be for ever .." How long did you wait?
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'phusion/ubuntu-14.04-amd64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Adapter 3: hostonly
default: Adapter 4: hostonly
==> default: Forwarding ports...
default: 3000 => 3334 (adapter 1)
default: 1080 => 1082 (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: 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...
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...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: stop: Unknown instance:
==> default: mongod start/running, process 8424

Not really a solution per-say, but I have found that when I timed out after getting that message ~20 times that I could vagrant halt the machine (which forces it as there is no ssh connection that can be made), ran vagrant up, it worked only giving me the warning twice.
So... turn it off and on again? So stupid but does seem to work untill there's an actual solution.

Related

Vagrant and Virtual Box keep getting set to Aborted

I am having an issue with vagrant and virtualbox in which I am able to vagrant up fine but after a few minutes (sometimes it's 5 minutes sometimes it's an hour) my virtualbox gets set to an 'ABORTED' status. I am unsure of why this happens.
I'm using VirtualBox 5.1.28 and the most recent version of vagrant (2.0.0). I'm running macOS Sierra 10.12.6.
Below is the output of my vagrant up command. I've noticed there is a disconnect retry thing but I don't know why that is there. It is not there for my coworkers. I've done some googling already and all the people with the same problem never make it out of the disconnect retry loop.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Specific bridge 'en1: Wi-Fi (AirPort)' not found. You may be asked to specify
==> default: which network to bridge to.
==> default: Available bridged network interfaces:
1) en0: Wi-Fi (AirPort)
2) en1: Thunderbolt 1
3) en2: Thunderbolt 2
4) bridge0
5) p2p0
6) awdl0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 80 (guest) => 8080 (host) (adapter 1)
default: 3306 (guest) => 33306 (host) (adapter 1)
default: 5000 (guest) => 5000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (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: password
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:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/jdavis/hts_vagrant
default: /app/localhost/html => /Users/jdavis/projects
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script

Connection to homestead Refused

Hey I have been trying to get my homestead running but I keep getting to the error:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 443 => 44300 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (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 refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
I am running windows 10 and Virtual box 5.0.4
The error is happening right after the line 'default: SSH auth method: private key' and presents a connection refused error, so I assume it can be related to your ssh keys. Did you check if your ssh keys are set properly?
ssh-keygen -t rsa -C "you#homestead"
Try running this again and set your public and private key paths in the homestead.yaml file (make sure it points to the file properly) then try again.
If the problem persists show us your homestead.yaml file so we can try to help better :) I hope I could be of help

vagrant doesn't boot up

I'm trying to boot up my VM using the 'vagrant up' command but with no success.it get some error like following:
vagrant destroy&&vagrant up
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu1404'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: ubuntu_default_1427785207620_64334
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Adapter 3: bridged
==> 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 refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
default: Warning: Connection refused. Retrying...
I have tried some method form here:https://laracasts.com/discuss/channels/general-discussion/homestead-doesnt-boot-up
my software information:
vagrant 1.7.2
virtualbox 4.3.26
window 8.1
anyone have idea to solve it?
It seems its a virtual box / vagrant version incompatibility issue
I uninstalled Virtual Box 4.3.14 and installed Virtual Box 4.3.12 and it worked. Basically I downgraded virtual box.
I found the answer here Vagrant Connection Refused Error

Why does Vagrant not work right out of the box on Windows 7?

Windows 7 64-bit here. Went to the Vagrant stable version downloads page. Downloaded the Windows 64-bit installer, installed using all recommended defaults, and rebooted.
Then read their Getting Started Guide. Opened a command prompt:
vagrant init hashicorp/precise32
And see the following output:
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.
OK. So far so good. Then I do:
vagrant up
And here is the output:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'hashicorp/precise32' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'hashicorp/precise32'
default: URL: https://atlas.hashicorp.com/hashicorp/precise32
==> default: Adding box 'hashicorp/precise32' (v1.0.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/hashicorp/boxes/precise32/versions/1.0.0/providers/virtualbox.box
default:
==> default: Successfully added box 'hashicorp/precise32' (v1.0.0) for 'virtualbox'!
==> default: Importing base box 'hashicorp/precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Setting the name of the VM: vms_default_1421176231425_15801
==> 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: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. 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...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. 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.
Then I read the next part of the Getting Started Guide:
Now imagine every project you've ever worked on being this easy to set up.
LOL
Why am I getting this error?

Vagrant mount multiple folders on the same point - logout

I try to NFS mount 3 folders into my own vagrant box (I created this box with CentOS),
but it seems always mount the folders on the same point (/home/vagrant/logout)
here is my Vagrantfile:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "my_box"
config.vm.network "private_network", ip: "192.168.100.100"
config.ssh.pty = true
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.synced_folder "../Larvata/a", "/home/A", type: "nfs"
config.vm.synced_folder "../Larvata/b", "/home/B", type: "nfs"
config.vm.synced_folder "../Larvata/c", "/home/C", type: "nfs"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
end
my vagrant up message:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
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: Error: Connection timeout. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
default: Error: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/A' logout
Stdout from the command:
export TERM=vt100
mount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/B' logout
exit
export TERM=vt100
logoutmount -o 'vers=3,udp' 192.168.100.1:'/Users/zx1986/Larvata/C
mount.nfs: /home/vagrant/logout is busy or already mounted
exit
logout
Stderr from the command:
this /etc/exports generated by vagrant:
# VAGRANT-BEGIN: 501
"/Users/zx1986/Box" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/a" 192.168.100.100 -alldirs -mapall=501:20
"/Users/zx1986/Larvata/b" "/Users/zx1986/Larvata/c" 192.168.100.100 -alldirs -mapall=501:20
# VAGRANT-END: 501
Virtaulbox 4.3.12
Vagrant 1.5.1
MacOS 10.9.3
Any idea or clues?
I have googled for a while, but haven't seem anything about the "logout" mount point.

Resources