卡住尝试使用Chef引导Windows服务器 [英] Stuck trying to bootstrap Windows server using Chef

查看:104
本文介绍了卡住尝试使用Chef引导Windows服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一位Mac女孩,致力于通过Opscode的Managed Chef将刀窗连接到我的Rackspace Windows服务器。
(我知道,这听起来很奇怪,但是这些Windows服务器是客户要求的。)

I am a mac girl, working on connecting with knife-windows trough Opscode's managed Chef to my Rackspace Windows servers. (I know, it sounds exotic, but these Windows servers are a customer requirment).

我试图向Chef兜兜风,但我坚持尝试使用knife-windows命令在Rackspace上引导Windows 2008 Server。

I tried to Chef for a spin but I am stuck in trying to bootstrap the Windows 2008 Server on Rackspace with the knife-windows command.

我正在OSX上工作,使用rvm,ruby 2.1.0和带有厨师+刀窗的本地gemset。

I am working on OSX, using rvm, ruby 2.1.0 and a local gemset with chef + knife-windows.

我正尝试遵循以下步骤:
https://github.com / opscode / knife-windows

I was trying to follow the steps from: https://github.com/opscode/knife-windows

我已经配置了winrm服务。
我已经设置了一个规则,以允许防火墙5598端口上的入站连接,并且我确认可以与telnet连接。

I have configured the winrm service. I have set up a rule to allow inbound connections in my firewall on port 5985,and I verified that I can connect with telnet.

了解Chef的屏幕投射,我尝试遵循该指南:
http://developer.rackspace.com/blog/step-by-step-walkthrough-to-using-chef-to -bootstrap-windows-nodes-on-the-rackspace-cloud.html

In addition to the Learn Chef screen casts, I have tried to follow the guide: http://developer.rackspace.com/blog/step-by-step-walkthrough-to-using-chef-to-bootstrap-windows-nodes-on-the-rackspace-cloud.html

我这样配置winrm:

I configured winrm like this:

winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
net stop winrm
sc config winrm start=auto
net start winrm






我正在使用这样的刀子:
刀靴窗口winrm 168。**** -x管理员-P'****'


I am using knife like this: knife bootstrap windows winrm 168.**** -x Administrator -P '****'

我找回了这个奇怪的日志,没有成功报告,厨师中没有实例出现管理控制台....我看到它试图多次插入字符'#39'吗?

I get back this strange log, no success report, no instance appearing in the chef management console .... I see that its trying to insert the character '#39' many times ?

WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
Bootstrapping Chef on 162.13.15.241
162.13.15.241 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-47130-1392751156.bat" chunk 1" 
162.13.15.241 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-47130-1392751156.bat" chunk 2" 
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-47130-1392751156.bat" chunk 3" 
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-47130-1392751156.bat" chunk 4" 
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 '#39' is not recognized as an internal or external command,
....
162.13.15.241  echo. 
162.13.15.241  echo.$webClient = new-object System.Net.WebClient;  
162.13.15.241  echo. 
162.13.15.241  echo.$webClient.DownloadFile($remoteUrl, $localPath); 
162.13.15.241 ) 1>C:\chef\wget.ps1 
162.13.15.241 C:\Users\Administrator>)

我试图遵循 Mac OS X工作站中的刀引导Windows Winrm失败,并将刀窗口降级到0.5.10版本,但是结果是相同的。

I tried to follow the advice from knife bootstrap windows winrm from Mac OS X workstation fails, and downgraded knife-windows to version 0.5.10, but the result is the same.

我的宝石集如下:

akami (1.2.1)
bigdecimal (1.2.3)
builder (3.2.2)
bundler (1.5.3)
bundler-unload (1.0.2)
chef (11.10.0)
chef-zero (1.7.3)
coderay (1.1.0)
diff-lcs (1.2.5)
em-winrm (0.5.4)
erubis (2.7.0)
eventmachine (1.0.0.beta.3)
excon (0.31.0)
executable-hooks (1.3.1)
ffi (1.9.3)
fog (1.20.0)
formatador (0.2.4)
gem-wrappers (1.2.4)
gssapi (1.0.3)
gyoku (1.1.1)
hashie (2.0.5)
highline (1.6.20)
httpclient (2.3.4.1)
httpi (0.9.7)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.8.1)
knife-rackspace (0.9.0)
knife-windows (0.5.10)
little-plugger (1.1.3)
logging (1.8.2)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.5.2)
minitest (4.7.5)
mixlib-authentication (1.3.0)
mixlib-cli (1.4.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.3.0)
moneta (0.6.0)
multi_json (1.8.4)
net-scp (1.1.2)
net-ssh (2.8.0)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
nokogiri (1.6.1)
nori (1.1.5)
ohai (6.20.0)
pry (0.9.12.6)
psych (2.0.2)
puma (1.6.3)
rack (1.5.2)
rake (10.1.0)
rdoc (4.1.0)
rest-client (1.6.7)
rubygems-bundler (1.4.2)
rubyntlm (0.1.1)
rvm (1.11.3.9)
savon (0.9.5)
slop (3.4.7)
systemu (2.5.2)
test-unit (2.1.0.0)
uuidtools (2.1.4)
wasabi (1.0.0)
winrm (1.1.3)
yajl-ruby (1.2.0)

有什么建议吗?这是OS X的东西吗? Windows Server的东西?厨师的事吗?

Any advice? Is this an OS X thing? Windows Server thing? Chef thing???

最后一丝希望,
Agata

With last shreds of hope, Agata

推荐答案

就我而言,RVM是罪魁祸首。
我设法通过以下步骤解决了这个问题:

In my case, RVM was the responsible culprit. I managed to resolve this issue by following steps:

1)从Opscode下载并安装Chef omnibus安装程序

1) downloading and installing Chef the omnibus installer from Opscode

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

2)直接在厨师库中安装刀窗:

2) Installing knife-windows directly in chefs library:

导航到 / opt / chef / embedded / bin / gem

通过禁用rvm使用系统红宝石:

Disable rvm by using system ruby:

rvm use system

3)
安装刀子Windows插件:

3) Install knife windows plugin :

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

现在,我可以使用命令

knife bootstrap windows winrm <IP Address> -p 5985  -x Administrator -P '<password>'

这篇关于卡住尝试使用Chef引导Windows服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆