I am trying to bootstrap windows server with chef-client. I am able to manually go in and install the Chef omnibus installer. Then I successfully installed the rubygem knife-windows for chef-client using the chef-client gem installer. When I attempt to execute

knife bootstrap windows winrm myserver.net

I receive time out messages as such:

    knife bootstrap windows winrm myserver.net
Bootstrapping Chef on myserver.net
Enter your password:
ERROR: Network Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (http://myserver.net:5985)
Check your knife configuration and network settings

I'm not sure what that means, or what to check.

--EDIT-- Found out, that I had to run: 'winwrm quickconfig -q' on the target windows server to open the ports. Now I'm receiving a 401 error from the server.

C:\Users\CP_USER>knife bootstrap windows winrm myserver.net -x CP_USER
Bootstrapping Chef on myserver.net
Enter your password:
ERROR: Failed to authenticate to ["myserver.net"] as CP_USER
Response: Bad HTTP response returned from server (401).

Run for Basic authentication :

C:\Users\Administrator> winrm set winrm/config/service @{AllowUnencrypted="true"}
C:\Users\Administrator> winrm set winrm/config/service/auth @{Basic="true"}

See: https://github.com/opscode/knife-windows#nodes

|improve this answer|||||
  • Thank you, that's what did it. I also learned that you need to have an updated framework on the older 2003 servers then run those commands. – FilBot3 Jun 11 '13 at 14:01
  • Now I'm getting this error: ..WARNING: Switching to Negotiate authentication, Basic does not support Domain Authentication. I have another SF question. stackoverflow.com/q/27748504/2009612 – FilBot3 Jan 19 '15 at 19:15

Please check if you can do a telnet from the workstation to the node you try to access.

This can be checked by typing telnet in a command prompt.

If telnet is not recognized as a command, then follow the steps:

1) Right click on "My Computer" > Manage > features
2) Click on "Add Features"
3) Select "Telnet Client"
4) Press Install buuton

It will take sometime to install.

Once it is installed, you can do the same telnet from your workstation's command prompt to the chef node

telnet <ip_address> 5985 //5985 is the port you want to do telnet.



|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.