【发布时间】:2014-05-29 02:49:50
【问题描述】:
我承认 - 我是一名零 Windows 管理的 Linux SysAd,所以我认为 Chef 会让我更轻松。男孩,我错了吗:-)
事情就是这样。我正在尝试在安装了 cygwin/ssh 的 Windows 2008r2 机器上引导 Chef - 所以我正在尝试的引导自然是通过 ssh。
现在,在通过疯狂的故障排除在本地修复了一些刀窗错误之后,我发现 Chef 下载失败的 powershell 脚本以某种方式失败并出现无法识别的错误 :-)
以下是详细信息:
knifep bootstrap windows ssh SERVER.AWS.COM -N wintest -x Administrator --environment "dev" --bootstrap-version 11.6.2
...
....
SERVER.AWS.COM C:\cygwin\home\Administrator>cscript /nologo C:\chef\wget.vbs /url:"https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64&v=11.6.2" /path:"C:\cygwin\tmp\chef-client-latest.msi"
SERVER.AWS.COM C:\chef\wget.vbs(31, 1) (null): The specified module could not be found.
SERVER.AWS.COM
SERVER.AWS.COM Failed download: download completed, but downloaded file not found
SERVER.AWS.COM Warning: Failed to download "https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64&v=11.6.2" to "C:\cygwin\tmp\chef-client-latest.msi"
SERVER.AWS.COM Warning: Retrying download with PowerShell if available...
SERVER.AWS.COM !powershell_download!
SERVER.AWS.COM Downloaded: "https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64&v=11.6.2&DownloadContext=PowerShell" "C:\cygwin\tmp\chef-client-latest.msi"
SERVER.AWS.COM Download via PowerShell succeeded.
SERVER.AWS.COM Installing downloaded client package...
SERVER.AWS.COM
SERVER.AWS.COM C:\cygwin\home\Administrator>msiexec /qn /log "C:\cygwin\tmp\chef-client-msi4840.log" /i "C:\cygwin\tmp\chef-client-latest.msi"
SERVER.AWS.COM This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
Chef-client package failed to install with status code !ERRORLEVEL!.
SERVER.AWS.COM See installation log for additional detail: C:\cygwin\tmp\chef-client-msi4840.log.
现在,我喜欢 ..cool,让我们看看日志文件,看看出了什么问题!这是:-)
milosgajdos@magnolia ~ $ ssh Administrator@SERVER.AWS.COM
Last login: Thu May 22 17:02:50 2014 from 82.211.87.195
Administrator@ip-0A3AA70D ~
$ ls -ltr /tmp/
total 32
-rw-r--r-- 1 Admin None 393 May 22 16:49 root.key
-rw-r--r-- 1 Admin None 2606 May 22 16:50 keys.tmp
-rw-r--r-- 1 Admin None 387 May 22 16:50 updatekeys.log
-rwxr-xr-x 1 Administrator None 9813 May 22 16:58 bootstrap-13677-1400777903.bat
-rwxr-xr-x 1 Administrator None 2 May 22 16:59 chef-client-msi4020.log
-rwxr-xr-x 1 Administrator None 9810 May 22 17:02 bootstrap-13718-1400778159.bat
-rwxr-xr-x 1 Administrator None 2 May 22 17:02 chef-client-msi4840.log
drwxrwxrwx+ 1 Admin None 0 May 22 17:07 sudo
Administrator@ip-0A3AA70D ~
$ cat /tmp/chef-client-msi4840.log
��
Administrator@ip-0A3AA70D ~
$
Errrr, w000000t ?!
好吧,经过数小时的挫折后,我决定通过远程桌面手动执行此操作。 我安装了 chef 综合包并测试是否安装了 chef-client 并得到 RBconfig 错误:
Administrator@ip-0A3AA70D /cygdrive/c
$ sudo chef-client -v
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:4: Use RbConfig instead of obsolete and deprecated Config.
Chef: 11.6.2
在此之后我放弃并尝试通过忽略上述警告来注册节点。确实成功了。
任何人都知道为什么下载引导脚本说它确实成功但它没有并导致引导完全失败? 谢谢!
【问题讨论】:
标签: windows chef-infra