Bootstrapping Chef to Windows Node failing

726 views Asked by At

I am new to Chef and have the Chef Server installed and the Chef DK installed on one Windows 2008 R2 machine (the WORKSTATION), and I am trying to bootstrap a 2nd Windows 2008 R2 machine from the WORKSTATION using:

knife bootstrap windows winrm ip_of_node -x Administrator -P password --node-name node1 -V -V

and this is failing. I have debug enabled and it repeats the following a bunch of times before failing:

..DEBUG: Adding 192.168.0.101
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => 192.168.0.101
DEBUG: 192.168.0.101 => :run_command
..DEBUG: Adding 192.168.0.101
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => 192.168.0.101
DEBUG: 192.168.0.101 => :run_command
..DEBUG: Adding 192.168.0.101
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => 192.168.0.101
DEBUG: 192.168.0.101 => :run_command
ERROR: No response received from remote node after 1.97 minutes, giving up.
ERROR: RuntimeError: Command execution failed.
PS C:\Users\Administrator\chef-repo>

I can telnet from the WORKSTATION to the NODE machine's port 5985 successfully.

What else might be causing this bootstrap to fail?

Thanks, Jim

EDIT: BTW, when I do netstat on the NODE, it is listening on port 5985, but I've seen references that it should be listening on BOTH 5985 and 5986? Is this why this is failing (listening on only one of the ports)? If so, why is it not listening on both ports?

1

There are 1 answers

0
user555303 On

Re. not being able to run the "winrm set" commands: I found that if I go to command prompt by typing "cmd" while in Powershell, I could then run the "winrm set" commands.

Once I was able to run the "winrm set" commands I ran the following:

winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'

After that, the "knife" worked and I was able to bootstrap the Windows 2008 R2 as NODE.

Jim