3

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).

2 Answers 2

3

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

2
  • 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, 2013 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, 2015 at 19:15
2

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.

Thanks!!!

Chandan

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .