2

我无法弄清楚为什么它没有在目标机器上安装客户端。
在 C 驱动器中 opscode 目录不可用,因此客户端未安装在目标节点上。

有人可以帮我解决这个问题。

10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 1"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 2"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 3"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 4"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 5"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 6"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 7"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 8"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 9"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 10"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 11"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 12"
10.233.188.207 "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-12616-1401793287.bat" chunk 13"
10.233.188.207 Checking for existing directory "C:\chef"...
10.233.188.207 Existing directory found, skipping creation.
10.233.188.207
10.233.188.207 C:\Users\Administrator>(
10.233.188.207 echo.url = WScript.Arguments.Named("url")
10.233.188.207  echo.path = WScript.Arguments.Named("path")
10.233.188.207  echo.proxy = null
10.233.188.207  echo.Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
10.233.188.207  echo.Set wshShell = CreateObject( "WScript.Shell" )
10.233.188.207  echo.Set objUserVariables = wshShell.Environment("USER")
10.233.188.207  echo.
10.233.188.207  echo.'http proxy is optional
10.233.188.207  echo.'attempt to read from HTTP_PROXY env var first
10.233.188.207  echo.On Error Resume Next
10.233.188.207  echo.
10.233.188.207  echo.If NOT (objUserVariables("HTTP_PROXY") = "") Then
10.233.188.207  echo.proxy = objUserVariables("HTTP_PROXY")
10.233.188.207  echo.
10.233.188.207  echo.'fall back to named arg
10.233.188.207  echo.ElseIf NOT (WScript.Arguments.Named("proxy") = "") Then
10.233.188.207  echo.proxy = WScript.Arguments.Named("proxy")
10.233.188.207  echo.End If
10.233.188.207  echo.
10.233.188.207  echo.If NOT isNull(proxy) Then
10.233.188.207  echo.'setProxy method is only available on ServerXMLHTTP 6.0+
10.233.188.207  echo.Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")
10.233.188.207  echo.objXMLHTTP.setProxy 2, proxy
10.233.188.207  echo.End If
10.233.188.207  echo.
10.233.188.207  echo.On Error Goto 0
10.233.188.207  echo.
10.233.188.207  echo.objXMLHTTP.open "GET", url, false
10.233.188.207  echo.objXMLHTTP.send()
10.233.188.207  echo.If objXMLHTTP.Status = 200 Then
10.233.188.207  echo.Set objADOStream = CreateObject("ADODB.Stream")
10.233.188.207  echo.objADOStream.Open
10.233.188.207  echo.objADOStream.Type = 1
10.233.188.207  echo.objADOStream.Write objXMLHTTP.ResponseBody
10.233.188.207  echo.objADOStream.Position = 0
10.233.188.207  echo.Set objFSO = Createobject("Scripting.FileSystemObject")
10.233.188.207  echo.If objFSO.Fileexists(path) Then objFSO.DeleteFile path
10.233.188.207  echo.Set objFSO = Nothing
10.233.188.207  echo.objADOStream.SaveToFile path
10.233.188.207  echo.objADOStream.Close
10.233.188.207  echo.Set objADOStream = Nothing
10.233.188.207  echo.End if
10.233.188.207  echo.Set objXMLHTTP = Nothing
10.233.188.207 ) 1>C:\chef\wget.vbs
10.233.188.207
10.233.188.207 C:\Users\Administrator>(
10.233.188.207 echo.param(
10.233.188.207  echo.   [String] $remoteUrl,
10.233.188.207  echo.   [String] $localPath
10.233.188.207  echo.)
10.233.188.207  echo.
10.233.188.207  echo.$webClient = new-object System.Net.WebClient;
10.233.188.207  echo.
10.233.188.207  echo.$webClient.DownloadFile($remoteUrl, $localPath);
10.233.188.207 ) 1>C:\chef\wget.ps1
10.233.188.207
10.233.188.207 C:\Users\Administrator>(
10.233.188.207
10.233.188.207
10.233.188.207
10.233.188.207 )
10.233.188.207 Detected Windows Version 6.1 Build 7600
10.233.188.207
10.233.188.207 C:\Users\Administrator>goto Version6.1
10.233.188.207
10.233.188.207 C:\Users\Administrator>goto architecture_select
10.233.188.207
10.233.188.207 C:\Users\Administrator>goto Architecture
10.233.188.207
10.233.188.207 C:\Users\Administrator>goto ArchitectureAMD64
10.233.188.207
10.233.188.207 C:\Users\Administrator>goto install
10.233.188.207 Checking for existing downloaded package at "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
10.233.188.207 No existing downloaded packages to delete.
10.233.188.207 Attempting to download client package using cscript...
10.233.188.207
10.233.188.207 C:\Users\Administrator>cscript /nologo C:\chef\wget.vbs /url:"https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64" /path:"C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
10.233.188.207 C:\chef\wget.vbs(29, 1) msxml3.dll: The operation timed out
10.233.188.207
10.233.188.207
10.233.188.207 Failed download: download completed, but downloaded file not found
10.233.188.207 Warning: Failed to download "https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64" to "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
10.233.188.207 Warning: Retrying download with PowerShell if available...
10.233.188.207 powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -command "& 'C:\chef\wget.ps1' 'https://www.opscode.com/chef/download?p=windows&pv=2008r2&m=x86_64&DownloadContext=PowerShell' 'C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi'"
10.233.188.207 Exception calling "DownloadFile" with "2" argument(s): "The remote server retur
10.233.188.207 ned an error: (407) Proxy Authentication Required."
10.233.188.207 At C:\chef\wget.ps1:8 char:24
10.233.188.207 + $webClient.DownloadFile <<<< ($remoteUrl, $localPath);
10.233.188.207     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
10.233.188.207     + FullyQualifiedErrorId : DotNetMethodException
10.233.188.207
10.233.188.207 Download via PowerShell succeeded.
10.233.188.207 Installing downloaded client package...
10.233.188.207
10.233.188.207 C:\Users\Administrator>msiexec /qn /log "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-msi1331.log" /i "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
10.233.188.207 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.
10.233.188.207 Chef-client package failed to install with status code 1619.
10.233.188.207

10.233.188.207  echo.10.233.188.207  echo.# Using default node name (fqdn)
10.233.188.207 ) 1>C:\chef\client.rb
10.233.188.207
10.233.188.207 C:\Users\Administrator>(echo.{"run_list":["recipe[notepad]"]}) 1>C:\chef\first-boot.json
10.233.188.207 Starting chef to bootstrap the node...
10.233.188.207
10.233.188.207 C:\Users\Administrator>SET "PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\BMC Software\BBCA\Tuner\System;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\ruby\bin;C:\opscode\chef\bin;C:\opscode\chef\embedded\bin"
10.233.188.207
10.233.188.207 C:\Users\Administrator>chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json -E _default
10.233.188.207 See installation log for additional detail: C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-msi1331.log.
10.233.188.207 'chef-client' is not recognized as an internal or external command,
10.233.188.207 operable program or batch file.
4

2 回答 2

2

请检查它尝试执行厨师客户端的用户。验证用户是否具有安装 chef-client 的权限。

于 2014-06-03T13:49:30.940 回答
0

你的问题在这里:

10.233.188.207 Exception calling "DownloadFile" with "2" argument(s): "The remote server retur
10.233.188.207 ned an error: (407) Proxy Authentication Required."

因此,您的代理似乎需要身份验证。两种选择:

1)您的代理支持基本身份验证(不仅是 NTLM),您可以在为引导程序提供的代理中以http://<user>:<password>@<proxy_adress>:<proxy_port警告的形式设置用户和密码:如果您的密码包含特殊字符(如 @、#、é 等)您应该将它们添加为 url 编码字符(即:@ => %40 ,# => %23 所以在您的密码中,每个特殊字符都有 %。请参阅http://meyerweb.com/eric/tools/dencoder /对其进行编码)

2)您在目标节点上遇到了 NTLM 身份验证,运气不好,但是:您可以在节点和代理之间使用身份验证代理,例如ntlmaps首先使用简单的导航器尝试以确保它可以正常工作,您可能会必须调整参数才能使其工作。

还有一件事:如果您的代理进行 SSL 拦截,那么稍后您的证书将有另一个糟糕的时间,cacert.pem除了您的 windows ca 证书存储之外,您还必须将它添加到 chef。对于某些工具(如捆绑包),您必须设置SSL_CERT_FILE=c:/chef/embedded/ssl/certs/cacert.pem(将路径调整到您的安装位置)

对于 vagrant,它有自己的 cacert.pem 文件,需要在 vagrant 安装目录的根目录进行相同的操作,并且 vagrant 在运行时强制使用此文件,覆盖环境变量。

编辑:(刚刚看到这个问题很老了,我不确定我为什么找到它,但我提供的信息仍然有效,所以保持原样)

于 2015-01-05T16:03:15.703 回答