pires / kubernetes-vagrant-coreos-cluster

Kubernetes cluster (for testing purposes) made easy with Vagrant and CoreOS.
Apache License 2.0
597 stars 205 forks source link

Timed out while waiting for the machine to boot #282

Closed bochuxt closed 6 years ago

bochuxt commented 6 years ago

vagrant up Bringing machine 'master' up with 'virtualbox' provider... Bringing machine 'node-01' up with 'virtualbox' provider... Bringing machine 'node-02' up with 'virtualbox' provider... ==> master: Running triggers before up... ==> master: 2018-02-17 20:49:28 -0800: setting up Kubernetes master... ==> master: Setting Kubernetes version 1.9.2 ==> master: Importing base box 'coreos-alpha'... ==> master: Matching MAC address for NAT networking... ==> master: Checking if box 'coreos-alpha' is up to date... ==> master: Setting the name of the VM: cluster_master_1518929372191_65253 ==> master: Clearing any previously set network interfaces... ==> master: Preparing network interfaces based on configuration... master: Adapter 1: nat master: Adapter 2: hostonly ==> master: Forwarding ports... master: 22 (guest) => 2222 (host) (adapter 1) ==> master: Running 'pre-boot' VM customizations... ==> master: Booting VM... ==> master: Waiting for machine to boot. This may take a few minutes... master: SSH address: 127.0.0.1:2222 master: SSH username: core master: SSH auth method: private key 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.

marcingorzynski77 commented 6 years ago

Hi , I have got similar issue and when I read through the logs it seems to be related to the ssh login issue. Any advice , I am about to give up on this example as I am not sure how to proceed further ?

DEBUG ssh: == Net-SSH connection debug-level log START == DEBUG ssh: D, [2018-02-19T22:26:15.086219 #85618] DEBUG -- net.ssh.transport.session[8119455c]: establishing connection to 127.0.0.1:2201 D, [2018-02-19T22:26:15.087207 #85618] DEBUG -- net.ssh.transport.session[8119455c]: connection established I, [2018-02-19T22:26:15.087334 #85618] INFO -- net.ssh.transport.server_version[81191bb8]: negotiating protocol version D, [2018-02-19T22:26:15.087370 #85618] DEBUG -- net.ssh.transport.server_version[81191bb8]: local is `SSH-2.0-Ruby/Net::SSH_4.2.0 x86_64-darwin13'

DEBUG ssh: == Net-SSH connection debug-level log END == INFO ssh: SSH not up: #<Vagrant::Errors::NetSSHException: An error occurred in the underlying SSH library that Vagrant uses. The error message is shown below. In many cases, errors from this library are caused by ssh-agent issues. Try disabling your SSH agent or removing some keys and try again.

aadhik commented 6 years ago

as the issue is with SMP Limit the number of CPU to 1 . it comes up

marcingorzynski77 commented 6 years ago

changing a cpu limit to 1 helped indeed ! Thanks

peterfraedrich commented 6 years ago

Changing the paravritualization provider to "minimal" also fixes this issue with the benefit of using multiple CPU's.

gavvvr commented 6 years ago

@peterfraedrich could you please tell exactly what modifications are required to set 'minimal' paravritualization?

vb.customize ['modifyvm', :id, '--paravirtprovider', 'minimal'] did not work out for me

gavvvr commented 6 years ago

You can also fix the issue by replacing CoreOS channel from alpha to stable in Vagrantfile:

CHANNEL = ENV['CHANNEL'] || 'stable'

ikyatov commented 6 years ago

@gavvvr I fixed it so, edited the Vagrantfile 164 line: config.vm.provider :virtualbox do |v|

On VirtualBox, we don't have guest additions or a functional vboxsf

# in CoreOS, so tell Vagrant that so it can be smarter.
v.check_guest_additions = false
v.functional_vboxsf     = false
v.customize ["modifyvm", :id, "--paravirtprovider", "minimal"]

end

bmcustodio commented 6 years ago

@peterfraedrich thanks! Would you like to submit a pull request?