chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Exception: NoMethodError: undefined method `configure_proxy_environment_variables' for #<Chef::Application:0x00000003a64098> #405

Closed Taurino3 closed 7 years ago

Taurino3 commented 8 years ago

I am using knife version "Chef: 11.12.2" I need the knife-windows to work with this version

The work around does not work per issue #323, do I need to install a older version of knife-windows?

$knife bootstrap windows winrm -N -x -P --bootstrap-no-proxy -VV

DEBUG: Looking for key winrm_shell and found value cmd DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key ca_trust_file and found value DEBUG: Looking for key winrm_user and found value DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key winrm_transport and found value plaintext DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key winrm_password and found value DEBUG: Looking for key winrm_port and found value 5985 DEBUG: Looking for key session_timeout and found value 30 DEBUG: Looking for key session_timeout and found value 30 DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key winrm_transport and found value plaintext DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key winrm_transport and found value plaintext DEBUG: Looking for key winrm_authentication_protocol and found value negotiate DEBUG: Looking for key ca_trust_file and found value DEBUG: Looking for key ssl_peer_fingerprint and found value DEBUG: Looking for key winrm_shell and found value cmd DEBUG: Looking for key winrm_codepage and found value 65001 DEBUG: Looking for key ca_trust_file and found value DEBUG: Adding /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_session.rb:93:in configure_proxy': undefined methodconfigure_proxy_environment_variables' for # (NoMethodError) from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_session.rb:29:in initialize' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:189:innew' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:189:in create_winrm_session' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:184:inblock in session_from_list' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:181:in each' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:181:insession_from_list' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/winrm_knife_base.rb:63:in configure_session' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/knife-windows-1.7.0/lib/chef/knife/bootstrap_windows_winrm.rb:58:inrun' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/chef-11.12.2/lib/chef/knife.rb:492:in run_with_pretty_exceptions' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/chef-11.12.2/lib/chef/knife.rb:174:inrun' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/chef-11.12.2/lib/chef/application/knife.rb:135:in run' from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/chef-11.12.2/bin/knife:25:in<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p545/bin/knife:23:in load' from /usr/local/rvm/gems/ruby-1.9.3-p545/bin/knife:23:in

' from /usr/local/rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in eval' from /usr/local/rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in
'

mwrock commented 7 years ago

Do you need to use that version of chef on your workstation where you are running knife windows? Or do you need to use that version on the node you want to bootstrap? If you can, I'd suggest using a recent chef-dk/knifw-windows locally to bootstrap a node with the older version of chef.

Taurino3 commented 7 years ago

Hi Matt,

Thank you for your response.

I have a server with the below versions and knife windows works fine when bootstrapping. Chef: 12.15.19/knife-windows-1.7.0

but with Chef: 11.12.2/knife-windows-1.7.0 knife windows bootstrapping does not work, I guess what I really need to know is that Chef: 11.12.2 will not work with knife-windows-1.7.0 and I have no choice but to use a newer version of chef is this correct?

mwrock commented 7 years ago

We try to keep knife windows support for the chef 11 gem but not it's ruby version so you will have issues with older ruby versions like the one bundled in the chef 11 distribution package.