UtahDave / salt-vagrant-demo

Demo of Salt in Vagrant. 1 master and 2 minions
Apache License 2.0
247 stars 191 forks source link

Vagrant 2.0.0 ssh issues #41

Closed sparkythehuman closed 6 years ago

sparkythehuman commented 6 years ago

When trying to run vagrant up on 2.0.0 the environments but exits during provisioning. Here is what I got:

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.

I ran vagrant up --debug and didn't seem to get any issues (red text). The output of which is here: https://gist.github.com/sparkythehuman/32a88011837aee86758b5c70285e3299

If I run vagrant status after that, I see all the boxes running but when trying to vagrant ssh master, I get this error:

ssh_exchange_identification: Connection closed by remote host

After looking through the issues, I saw that in https://github.com/UtahDave/salt-vagrant-demo/issues/32 that this was tested with Vagrant 1.9.0. When I downgraded to 1.9.0, destroyed my boxes and reran vagrant up everything seemed to work fine.

ddnomad commented 6 years ago

I would suggest booting the VM from a virtualbox interface (or from the interface of a provider you use) to see whether there are some issues guest-wise. I've compiled vagrant from sources (github) and everything runs smoothly with virtualbox 5.2.0 r118415.

UtahDave commented 6 years ago

Hi @sparkythehuman, have you upgraded Virtualbox, too?

Here's my Vagrant version info:

[me@me salt-vagrant-demo (master u=)]$ vagrant --version
Vagrant 2.0.0

And here's my Virtualbox version info:

Version 5.1.30 r118389

It spun up the master and 2 minions. vagrant ssh master got me right into the master and I was able to run commands on the minions.

vagrant@saltmaster:~$ sudo salt \* test.version
minion2:
    2017.7.2
minion1:
    2017.7.2
kapgarxmatters commented 6 years ago

I was running into similar problems and simply upgraded my virtualbox to the latest. Worked like a charm.

dinesh13506 commented 6 years ago

Hi on salt \* test.ping i got Minion did not return. [No response] minions are not responding. How should i debug it? on salt-key -L output: Accepted Keys: minion1 minion2 Denied Keys: Unaccepted Keys: Rejected Keys: can anyone help?

timmah1991 commented 6 years ago

@dinesh13506 try adding: config.ssh.insert_key = false to Vagrantfile