knife bootstrap windows winrm from Mac OS X workstation fails

本秂侑毒 提交于 2019-12-03 21:06:13

It seems to work with knife-windows 0.5.10 [tested with windows server 2008R2]

Install it with:

gem uninstall knife-windows
gem install knife-windows -v 0.5.10   

check your gems with:

gem list|grep knife-windows

And it should show:

knife-windows (0.5.10)  
Mohan Karthik Sanagapalli

I faced a similar issue. What i did was:

Uninstall gem and then did aptitude update, and then installed gem & knife windows pluggin in this loaction(/opt/chef/embedded/bin/gem install knife-windows), and opened the 5985 port and configured the winrm:

  1.winrm quickconfig -q   
  2.winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}  
  3.winrm set winrm/config @{MaxTimeoutms="1800000"}  
  4.winrm set winrm/config/service @{AllowUnencrypted="true"}   
  5.winrm set winrm/config/service/auth @{Basic="true"}

and then bootstrapped:

knife bootstrap windows winrm ec2-xx-xxx-xx.compute-1.amazonaws.com -r 'recipe[cookbook]' -x Administrator -P xxxxxxxx -N "WIN-xxxxx"
themathmagician

I had exactly the same issue with #39 characters on my OSX, see my description of it: Stuck trying to bootstrap Windows server using Chef

In my case, rvm was the responsible culprit.

I managed to resolve this issue by following steps: 1) downloading and running the omnibus installer

curl -L https://www.opscode.com/chef/install.sh | sudo bash

2) Disabling rvm by using system ruby:

rvm use system 

3)installing knife-windows directly in chefs library:

sudo /opt/chef/embedded/bin/gem install knife-windows

This, together with configuring the Windows 2008 server as recommended on https://github.com/opscode/knife-windows (commands available in this gist: https://gist.github.com/jimcroft/3878113) did the trick, and I could bootstrap my node :) Agata

Looks like the problem may be related to poor interoperability between Ruby 2.x and the winrm gem:

https://github.com/WinRb/WinRM/pull/73

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!