chef / knife-windows

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

Problem with bootstrapping Windows using WinRM #361

Closed kdugardyn66 closed 6 years ago

kdugardyn66 commented 8 years ago

Hi,

I'm trying to get my Windows Server bootstrapped but getting continuously following error: Connecting to windows DEBUG: Looking for bootstrap template in /opt/chef/embedded/apps/chef/lib/chef/knife/bootstrap/templates DEBUG: Found bootstrap template in /opt/chef/embedded/apps/chef/lib/chef/knife/bootstrap/templates DEBUG: Adding windows DEBUG: establishing connection to windows:22 ERROR: Network Error: getaddrinfo: Name or service not known Check your knife configuration and network settings

My command I'm running is: knife bootstrap windows winrm IP_ADDRESS -N FDDN -x 'domain\username' -P password -VV

I've installed knife-windows.0.8.5 (which is working well in the past).

Kind Regards, Kris

mwrock commented 8 years ago

What happens using a modern version like 1.4.0?

WeekendsBull commented 8 years ago

I have installed ChefDK (v0.12.0) and then run "chef exec knife bootstrap windows winrm ...." (we are on OHC and learned from Zack). However, the same command doesn't work any more ...

mwrock commented 8 years ago

Are you getting the same getaddrinfo error mentioned above?

WeekendsBull commented 8 years ago

Hi Matt, yes unfortunately, I got the same error on the getaddrinfo error as below.

C:/opscode/chef/embedded/lib/ruby/2.1.0/socket.rb:232:in `getaddrinfo' : getaddrinfo: No such host is known. (SocketError).

chef exec works fine to bootstrap in windows 2012R2 (using ChefDK v0.12.0 with Chef-client 12.9.38-1). Also, I'm on knife-windows 1.4.0

mwrock commented 8 years ago

Just taking another look at this issue and noticing @kdugardyn66 output indicates that knife-windows is not loaded.Its trying to contact a hostname windows on port 22. So its using the core knife bootstrap using ssh.

cheeseplus commented 6 years ago

Closing old issues that were resolved or a result of configuration error as this one.