web-dev-qa-db-fra.com

défaut: Avertissement: Déconnexion de la connexion à distance. Réessayer

Quand je lance vagrant up, je reçois:

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...

Cet avertissement sera pour toujours ..

Ce que j’ai remarqué, c’est que si j’ai démarré manuellement la VM (sans vagabondage), cela fonctionnera sans délai, mais uniquement si j’ai activé l’adaptateur 2 sur VM comme suit:enter image description here Comment puis-je activer l'adaptateur 2 de VM en utilisant vagrant up?

MODIFIER

Vagrantfile est:

# -*- 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
15
simo

Pour moi, il s'est avéré que la patience était la réponse.
Je recevais le message (je l’ai reçu 12 fois) mais j’attendis quelques minutes, puis il réussit . Lorsque vous dites "cet avertissement sera pour toujours", vous avez attendu combien de temps?

$ 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
18
Michael Durrant

Pas vraiment une solution à proprement parler, mais j’ai trouvé que lorsque j’ai dépassé le délai imparti après avoir reçu ce message ~ 20 fois, j’ai pu vagrant halt la machine (ce qui la force car il n’ya pas de connexion ssh pouvant être établie), a lancé vagrant up, c’est travaillé seulement me donner l'avertissement deux fois.

Alors ... éteignez-le et rallumez-vous? Tellement stupide mais semble fonctionner jusqu'à ce qu'il y ait une solution réelle.

0
WolfieZero