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

knife bootstrap aksing password, even if -P option is not provided #9675

Closed
yogeshlc opened this issue Apr 16, 2020 · 11 comments
Closed

knife bootstrap aksing password, even if -P option is not provided #9675

yogeshlc opened this issue Apr 16, 2020 · 11 comments
Labels
Type: Bug Does not work as expected.

Comments

@yogeshlc
Copy link

yogeshlc commented Apr 16, 2020

Description

knife bootstrap aksing password, even if -P option is not provided.
eg.
knife bootstrap -U test1 --sudo 10.0.80.1 -F text -N ABCNode --bootstrap-template ~/abc/templates/chef-client-install.erb -E ABCEnv

it prompts:
Connecting to 10.0.80.1
WARNING: Failed to authenticate test1 to 10.0.80.1 - trying password auth
Enter password for test1@10.0.80.1.

Connecting to 10.0.80.1
The authenticity of host '10.0.80.1 ()' can't be established.
fingerprint is SHA256:w+YuqafdJJMTFrrZjeZzEQZiZyDs7f0q0srhxYsdfssfd.

Are you sure you want to continue connecting
? (Y/N) Y
Connecting to 10.0.80.1
WARN: [SSH] connection failed, terminating (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
ERROR: Train::Transports::SSHFailed: SSH session could not be established

Chef Version

ChefDK version: 4.7.73
Chef Infra Client version: 15.7.32
Chef InSpec version: 4.18.51
Test Kitchen version: 2.3.4
Foodcritic version: 16.2.0
Cookstyle version: 5.20.0

Platform Version

Linux

Replication Case

Client Output


Stacktrace

-bash-4.2$ knife bootstrap -V -V -U test1 --sudo 10.0.80.1 -F text -N ABCNode --bootstrap-template ~/abc/templates/chef-client-install.erb -E ABCEnv

INFO: Using configuration from ~/.chef/knife.rb
DEBUG: Checking if we need to accept Chef license to bootstrap node
DEBUG: Reading products and relationships...
DEBUG: Successfully read products and relationships
DEBUG: License acceptance required for chef version: 15
DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
DEBUG: Found license chef_infra_client at /etc/chef/accepted_licenses/chef_infra_client
DEBUG: Found license inspec at /etc/chef/accepted_licenses/inspec
DEBUG: Missing licenses remaining: []
DEBUG: All licenses present
Connecting to 10.0.80.1
WARNING: Failed to authenticate test1 to 10.0.80.1 - trying password auth
Enter password for test1@10.0.80.1.

Connecting to 10.0.80.1
DEBUG: [SSH] test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>:always}> (cmd.exe /c ver)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>:always}>
Connecting to 10.0.80.1
DEBUG: [SSH] test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}> (cmd.exe /c ver)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
WARN: [SSH] connection failed, terminating (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
Traceback (most recent call last):
34: from /bin/knife:349:in

' 33: from /bin/knife:349:in load'
32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/bin/knife:24:in <top (required)>' 31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/application/knife.rb:163:in run'
30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:229:in run' 29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:485:in run_with_pretty_exceptions'
28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/local_mode.rb:42:in with_server_connectivity' 27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:486:in block in run_with_pretty_exceptions'
26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:574:in run' 25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:625:in connect!'
24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:697:in do_connect' 23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:70:in connect!'
22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:57:in connection' 21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:82:in connection'
20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in create_new_connection' 19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in new'
18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:53:in initialize' 17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/extras/command_wrapper.rb:166:in load'
16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:116:in platform' 15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect.rb:9:in scan'
14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in scan' 13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in each'
12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:33:in block in scan' 11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in scan_children'
10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in each' 9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in block in scan_children'
8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in instance_eval' 7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/specifications/os.rb:29:in block in load'
6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:4:in detect_windows' 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:9:in check_cmd'
4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:128:in run_command' 3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:223:in run_command_via_connection'
2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:254:in session' 1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:185:in establish_connection'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh.rb:263:in start': Authentication failed for user test1@10.0.80.1 (Net::SSH::AuthenticationFailed) 34: from /bin/knife:349:in
'
33: from /bin/knife:349:in load' 32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/bin/knife:24:in <top (required)>'
31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/application/knife.rb:163:in run' 30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:229:in run'
29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:485:in run_with_pretty_exceptions' 28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/local_mode.rb:42:in with_server_connectivity'
27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:486:in block in run_with_pretty_exceptions' 26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:574:in run'
25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:625:in connect!' 24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:697:in do_connect'
23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:70:in connect!' 22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:57:in connection'
21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:82:in connection' 20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in create_new_connection'
19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in new' 18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:53:in initialize'
17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/extras/command_wrapper.rb:166:in load' 16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:116:in platform'
15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect.rb:9:in scan' 14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in scan'
13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in each' 12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:33:in block in scan'
11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in scan_children' 10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in each'
9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in block in scan_children' 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in instance_eval'
7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/specifications/os.rb:29:in block in load' 6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:4:in detect_windows'
5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:9:in check_cmd' 4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:128:in run_command'
3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:223:in run_command_via_connection' 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:254:in session'
1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:179:in establish_connection' /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:189:in rescue in establish_connection': SSH session could not be established (Train::Transports::SSHFailed)

@yogeshlc yogeshlc added the Status: Untriaged An issue that has yet to be triaged. label Apr 16, 2020
@kvivek1115
Copy link
Contributor

@yogeshlc Thanks for reporting the issue.

Seems this is the intended behavior of the bootstrap process first it will prefer keys, falling back to password.

@yogeshlc
Copy link
Author

@vsingh-msys Yaa....that may be true.
But what about the case where user don't want to provide either of it (means ssh without key file or password)?

@kvivek1115
Copy link
Contributor

If No authentication needed then don't need to mention (-i or -P) it will bootstrap the node without fail...

@yogeshlc
Copy link
Author

That's what I have mentioned in the bug .... Even if no -i or -P option mentioned knife bootstrap is failing with authentication error.

@yogeshlc
Copy link
Author

Bug #8821 and MR #8856 is similar to the issue I am facing.
Anyone to help here?
@mattray
@vsingh-msys
@marcparadise
@Nimesh-Msys
@tas50
@samshinde

@kvivek1115
Copy link
Contributor

It's better to provide the debug here.. using -VV option.

Also How you manage to login into node over ssh?
have you tried to log in directly using ssh?

@yogeshlc
Copy link
Author

yogeshlc commented Apr 20, 2020

Yes I am able to login using ssh into the node without any key or password.
Command I fired:
-bash-4.2$ ssh test1@10.0.80.1
Output:
Last login: Mon Apr 20 05:28:48 2020 from abc
[test1@ABCNode ~]$

@yogeshlc
Copy link
Author

yogeshlc commented Apr 20, 2020

Debug using -V -V option:

-bash-4.2$ knife bootstrap -V -V -U test1 --sudo 10.0.80.1 -F text -N ABCNode --bootstrap-template ~/abc/templates/chef-client-install.erb -E ABCEnv

INFO: Using configuration from ~/.chef/knife.rb
DEBUG: Checking if we need to accept Chef license to bootstrap node
DEBUG: Reading products and relationships...
DEBUG: Successfully read products and relationships
DEBUG: License acceptance required for chef version: 15
DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
DEBUG: Found license chef_infra_client at /etc/chef/accepted_licenses/chef_infra_client
DEBUG: Found license inspec at /etc/chef/accepted_licenses/inspec
DEBUG: Missing licenses remaining: []
DEBUG: All licenses present
Connecting to 10.0.80.1
WARNING: Failed to authenticate test1 to 10.0.80.1 - trying password auth
Enter password for test1@10.0.80.1.

Connecting to 10.0.80.1
DEBUG: [SSH] test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>:always}> (cmd.exe /c ver)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>false, :verify_host_key=>:always}>
Connecting to 10.0.80.1
DEBUG: [SSH] test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}> (cmd.exe /c ver)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
INFO: [SSH] connection failed, retrying in 1 seconds (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
DEBUG: [SSH] opening connection to test1@10.0.80.1<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>[], :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>:accept_new}>
WARN: [SSH] connection failed, terminating (#<Net::SSH::AuthenticationFailed: Authentication failed for user test1@10.0.80.1>)
Traceback (most recent call last):
34: from /bin/knife:349:in <main>' 33: from /bin/knife:349:in load'
32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/bin/knife:24:in <top (required)>' 31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/application/knife.rb:163:in run'
30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:229:in run' 29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:485:in run_with_pretty_exceptions'
28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/local_mode.rb:42:in with_server_connectivity' 27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:486:in block in run_with_pretty_exceptions'
26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:574:in run' 25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:625:in connect!'
24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:697:in do_connect' 23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:70:in connect!'
22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:57:in connection' 21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:82:in connection'
20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in create_new_connection' 19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in new'
18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:53:in initialize' 17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/extras/command_wrapper.rb:166:in load'
16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:116:in platform' 15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect.rb:9:in scan'
14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in scan' 13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in each'
12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:33:in block in scan' 11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in scan_children'
10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in each' 9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in block in scan_children'
8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in instance_eval' 7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/specifications/os.rb:29:in block in load'
6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:4:in detect_windows' 5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:9:in check_cmd'
4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:128:in run_command' 3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:223:in run_command_via_connection'
2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:254:in session' 1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:185:in establish_connection'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/net-ssh-5.2.0/lib/net/ssh.rb:263:in start': Authentication failed for user test1@10.0.80.1 (Net::SSH::AuthenticationFailed) 34: from /bin/knife:349:in

'
33: from /bin/knife:349:in load' 32: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/bin/knife:24:in <top (required)>'
31: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/application/knife.rb:163:in run' 30: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:229:in run'
29: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:485:in run_with_pretty_exceptions' 28: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/local_mode.rb:42:in with_server_connectivity'
27: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife.rb:486:in block in run_with_pretty_exceptions' 26: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:574:in run'
25: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:625:in connect!' 24: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap.rb:697:in do_connect'
23: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:70:in connect!' 22: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.7.32/lib/chef/knife/bootstrap/train_connector.rb:57:in connection'
21: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:82:in connection' 20: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in create_new_connection'
19: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh.rb:240:in new' 18: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:53:in initialize'
17: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/extras/command_wrapper.rb:166:in load' 16: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:116:in platform'
15: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect.rb:9:in scan' 14: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in scan'
13: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:27:in each' 12: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:33:in block in scan'
11: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in scan_children' 10: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:45:in each'
9: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in block in scan_children' 8: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/scanner.rb:46:in instance_eval'
7: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/specifications/os.rb:29:in block in load' 6: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:4:in detect_windows'
5: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/platforms/detect/helpers/os_windows.rb:9:in check_cmd' 4: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/plugins/base_connection.rb:128:in run_command'
3: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:223:in run_command_via_connection' 2: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:254:in session'
1: from /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:179:in establish_connection' /opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/train-core-3.2.0/lib/train/transports/ssh_connection.rb:189:in rescue in establish_connection': SSH session could not be established (Train::Transports::SSHFailed)

@tas50
Copy link
Contributor

tas50 commented Apr 20, 2020

@vsingh-msys @yogeshlc Fixing the behavior change in Chef 15 outlined in #8821 would seem to be the fix here. That's a pretty high priority bug to workout.

@tas50 tas50 added Type: Bug Does not work as expected. and removed Status: Untriaged An issue that has yet to be triaged. labels Apr 20, 2020
@tas50
Copy link
Contributor

tas50 commented Apr 21, 2020

Closing this to track it in the original issue of #8821

@lock
Copy link

lock bot commented May 5, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants