Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap fails: Exception: undefined method `empty?' for nil:NilClass (NoMethodError) #8875

Open
n1th1l opened this issue Sep 11, 2019 · 9 comments

Comments

@n1th1l
Copy link

commented Sep 11, 2019

Description

I have a vagrant box running, on trying bootstrap using knife getting this error

Chef Version

ChefDK version: 4.3.13
Chef Infra Client version: 15.2.20
Chef InSpec version: 4.10.4
Test Kitchen version: 2.2.5
Foodcritic version: 16.1.1
Cookstyle version: 0.72.0

Platform Version

macOS High Sierra v10.13.6
Chef Infra Client: 15.2.20

Vagrant Version

box - bento/centos-7.2
box version - '2.2.9'

Replication Case

On running chef exec knife bootstrap localhost -p 2222 -U vagrant --sudo --ssh-identity-file /workspace-path/.vagrant/machines/web1/virtualbox/private_key -N web1 -VVV

Vagrant host is up
Host web1
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /workspace-path/.vagrant/machines/web1/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL

Client Output

Traceback (most recent call last):
	48: from /opt/chefdk/bin/knife:347:in `<main>'
	47: from /opt/chefdk/bin/knife:347:in `load'
	46: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/bin/knife:24:in `<top (required)>'
	45: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/application/knife.rb:162:in `run'
	44: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:222:in `run'
	43: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:474:in `run_with_pretty_exceptions'
	42: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/local_mode.rb:42:in `with_server_connectivity'
	41: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:475:in `block in run_with_pretty_exceptions'
	40: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:569:in `run'
	39: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:620:in `connect!'
	38: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:674:in `do_connect'
	37: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:70:in `connect!'
	36: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:57:in `connection'
	35: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:82:in `connection'
	34: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `create_new_connection'
	33: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `new'
	32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:53:in `initialize'
	31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/extras/command_wrapper.rb:166:in `load'
	30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:116:in `platform'
	29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect.rb:9:in `scan'
	28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `scan'
	27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `each'
	26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
	25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
	24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'
	23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
	22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
	21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/specifications/os.rb:29:in `block in load'
	20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_windows.rb:5:in `detect_windows'
	19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:128:in `run_command'
	18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:218:in `run_command_via_connection'
	17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:249:in `session'
	16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:180:in `establish_connection'
	15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh.rb:246:in `start'
	14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh.rb:246:in `new'
	13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:90:in `initialize'
	12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:223:in `wait'
	11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:223:in `loop'
	10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:225:in `block in wait'
	 9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:190:in `poll_message'
	 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:190:in `loop'
	 7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
	 6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/algorithms.rb:167:in `accept_kexinit'
	 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/algorithms.rb:228:in `proceed!'
	 4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/algorithms.rb:406:in `exchange_keys'
	 3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:72:in `exchange_keys'
	 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:188:in `verify_server_key'
	 1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/verifiers/always.rb:21:in `verify'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh/verifiers/always.rb:50:in `process_cache_miss': fingerprint SHA256:9YiPrthP/UES2serE/qWzv47wcgvDGUcmxTMtyxCKvE is unknown for "[localhost]:2222,[127.0.0.1]:2222" (Net::SSH::HostKeyUnknown)
	31: from /opt/chefdk/bin/knife:347:in `<main>'
	30: from /opt/chefdk/bin/knife:347:in `load'
	29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/bin/knife:24:in `<top (required)>'
	28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/application/knife.rb:162:in `run'
	27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:222:in `run'
	26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:474:in `run_with_pretty_exceptions'
	25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/local_mode.rb:42:in `with_server_connectivity'
	24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:475:in `block in run_with_pretty_exceptions'
	23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:569:in `run'
	22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:620:in `connect!'
	21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:674:in `do_connect'
	20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:70:in `connect!'
	19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:57:in `connection'
	18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:82:in `connection'
	17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `create_new_connection'
	16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `new'
	15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:53:in `initialize'
	14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/extras/command_wrapper.rb:166:in `load'
	13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:116:in `platform'
	12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect.rb:9:in `scan'
	11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `scan'
	10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `each'
	 9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
	 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
	 7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'
	 6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
	 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
	 4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/specifications/os.rb:29:in `block in load'
	 3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_windows.rb:5:in `detect_windows'
	 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:128:in `run_command'
	 1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:214:in `run_command_via_connection'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:226:in `rescue in run_command_via_connection': SSH command failed (fingerprint SHA256:9YiPrthP/UES2serE/qWzv47wcgvDGUcmxTMtyxCKvE is unknown for "[localhost]:2222,[127.0.0.1]:2222") (Train::Transports::SSHFailed)
	41: from /opt/chefdk/bin/knife:347:in `<main>'
	40: from /opt/chefdk/bin/knife:347:in `load'
	39: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/bin/knife:24:in `<top (required)>'
	38: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/application/knife.rb:162:in `run'
	37: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:222:in `run'
	36: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:474:in `run_with_pretty_exceptions'
	35: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/local_mode.rb:42:in `with_server_connectivity'
	34: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife.rb:475:in `block in run_with_pretty_exceptions'
	33: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:569:in `run'
	32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:617:in `connect!'
	31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:641:in `rescue in connect!'
	30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:674:in `do_connect'
	29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:70:in `connect!'
	28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:57:in `connection'
	27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:82:in `connection'
	26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `create_new_connection'
	25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `new'
	24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:53:in `initialize'
	23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/extras/command_wrapper.rb:166:in `load'
	22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:116:in `platform'
	21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect.rb:9:in `scan'
	20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `scan'
	19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `each'
	18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
	17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
	16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'
	15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:51:in `block in scan_children'
	14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:60:in `scan_family_children'
	13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
	12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'
	11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:51:in `block in scan_children'
	10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:60:in `scan_family_children'
	 9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
	 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'
	 7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
	 6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
	 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/specifications/os.rb:103:in `block in load'
	 4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:26:in `linux_os_release'
	 3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:38:in `parse_os_release_info'
	 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:38:in `each_with_object'
	 1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:38:in `each'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:44:in `block in parse_os_release_info': undefined method `empty?' for nil:NilClass (NoMethodError)

Stacktrace

@vsingh-msys

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

@n1th1l could you please confirm the vagrant node(target node) os platform and version if other than above provided platform detail?

@n1th1l

This comment has been minimized.

Copy link
Author

commented Sep 11, 2019

Vagrant Version

box - bento/centos-7.2
box version - '2.2.9'

@vsingh-msys

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2019

@n1th1l Thanks for the info.

you can try a couple of workarounds:

a. Delete the known_hosts file from your workstation.

rm ~/.ssh/known_hosts

b. Try to bootstrap the node with option --ssh-verify-host-key 'accept_new' OR --ssh-verify-host-key 'never'

Also, I would recommend setting hostname/IP and then bootstrap using 'hostname or ip address' for more info you can visit https://docs.chef.io/knife_bootstrap.html

In my case it working as expected with

Vagrant.configure(2) do |config|
  config.vm.box = "bento/centos-7.2"
  config.vm.hostname = 'node3.test'
  config.vm.network 'private_network', ip: '192.168.33.52'
  config.vm.provision "shell", inline: <<-SHELL
    echo 192.168.33.99 chef-server.test | sudo tee -a /etc/hosts
    echo 192.168.33.52 node3.test | sudo tee -a /etc/hosts
  SHELL
end

Knife bootstrap using:

chef exec knife bootstrap localhost -p 2200 -U vagrant --sudo -i /nodes/node3/.vagrant/machines/default/virtualbox/private_key -N web1 -VVV
@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_linux.rb:44:in `block in parse_os_release_info': undefined method `empty?' for nil:NilClass (NoMethodError)

that looks like some kind of bug in the train code.

@n1th1l

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

Hey, are there any alternate ways to bootstrap a node?

@vsingh-msys

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

You can try with the option --ssh-verify-host-key 'never', it might work I am not sure.

@n1th1l

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

Getting the same error. Will this error come in all the versions. I'll try to use the older version

@vsingh-msys

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

Alright, will provide fixes soon thanks!

@vsingh-msys

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

PR for this issue inspec/train#519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.