Knife bootstrap windows winrm 192.168.2.121 -x Administrator -P demo69 -N node2.example.com


#1

[root@chefworkstation chef-repo]# knife bootstrap windows winrm 192.168.2.121 -x Administrator -P demo69 -N node2.example.com
Node node2.example.com exists, overwrite it? (Y/N) y
Client node2.example.com exists, overwrite it? (Y/N) y
Creating new client for node2.example.com
Creating new node for node2.example.com

Waiting for remote response before bootstrap…ERROR: No response received from remote node after 2.04 minutes, giving up.
ERROR: Exception: Unable to parse authorization header. Headers: {“Cache-Control”=>“no-cache”, “Pragma”=>“no-cache”, “Content-Type”=>“text/html; charset=utf-8”, “Proxy-Connection”=>“Keep-Alive”, “Connection”=>“Keep-Alive”, “Content-Length”=>“750”}
Body:

Network Error
Network Error (tcp_error)

A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.
(503). ERROR: WinRM::WinRMHTTPTransportError: Unable to parse authorization header. Headers: {"Cache-Control"=>"no-cache", "Pragma"=>"no-cache", "Content-Type"=>"text/html; charset=utf-8", "Proxy-Connection"=>"Keep-Alive", "Connection"=>"Keep-Alive", "Content-Length"=>"750"} Body: Network Error
Network Error (tcp_error)

A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.
(503). [root@chefworkstation chef-repo]#

#2

is the winrm service running on the windows node and WinRM port 5985 open?
run this on the node to check if winrm is running.
C:\Users\administrator>Winrm quickconfig
run this to check if port is open: telnet IP PORT


#3

The fact that the winrm request got any response at all and that response was not a valid winrm SOAP response usually indicates there is a proxy involved here. Try setting the environment variable HTTP_PROXY to http://<proxy server>:<proxy port>. You can also set this in your knife.rb’s http_proxy setting.


#4

[root@chefworkstation chef-repo]# telnet 192.168.2.121 5985
Trying 192.168.2.121…
Connected to node2.example.com (192.168.2.121).
Escape character is ‘^]’.

is it Ok?


#5

yeah it looks like the port is open, what about the Winrm service, is it running?
log in to the windows machine and run this on the CMD
C:\Users\administrator>Winrm quickconfig
and as Matt suggested, do you have a proxy in between? if yes? than try setting the environment variable HTTP_PROXY to http://:. You can also set this in your knife.rb’s http_proxy setting.