[2014-08-08T00:54:28+00:00] INFO: *** Chef 11.8.2 ***
[2014-08-08T00:54:28+00:00] INFO: Chef-client pid: 2580
[2014-08-08T00:54:37+00:00] INFO: Setting the run_list to ["recipe[sql_server::default]"] from JSON
[2014-08-08T00:54:37+00:00] INFO: Run List is [recipe[sql_server::default]]
[2014-08-08T00:54:37+00:00] INFO: Run List expands to [sql_server::default]
[2014-08-08T00:54:37+00:00] INFO: Starting Chef Run for AMAZON-7D4172E3.ec2.internal
[2014-08-08T00:54:37+00:00] INFO: Running start handlers
[2014-08-08T00:54:37+00:00] INFO: Start handlers complete.
[2014-08-08T00:54:38+00:00] INFO: Processing windows_package[Microsoft SQL Server 2008 R2 Native Client] action install (sql_server::client line 26)
[2014-08-08T00:54:39+00:00] INFO: Installing windows_package[Microsoft SQL Server 2008 R2 Native Client] version latest
[2014-08-08T00:54:39+00:00] INFO: Processing remote_file[C:\chef\cache/sqlncli.msi] action create (dynamically defined)
[2014-08-08T00:54:39+00:00] INFO: Starting installation...this could take awhile.
[2014-08-08T00:54:40+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-08-08T00:54:40+00:00] ERROR: Running exception handlers
[2014-08-08T00:54:40+00:00] ERROR: Exception handlers complete
[2014-08-08T00:54:40+00:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
[2014-08-08T00:54:40+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: windows_package[Microsoft SQL Server 2008 R2 Native Client] (sql_server::client line 26) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 42, 127], but received '1603'
---- Begin output of msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO ----
STDOUT:
STDERR:
---- End output of msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO ----
Ran msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO returned 1603
[2014-08-08T00:54:35+00:00] WARN: unable to detect ip6address
[0m
================================================================================[0m
[31mError executing action `install` on resource 'windows_package[Microsoft SQL Server 2008 R2 Native Client]'[0m
================================================================================[0m
[0m
Mixlib::ShellOut::ShellCommandFailed[0m
------------------------------------[0m
Expected process to exit with [0, 42, 127], but received '1603'
---- Begin output of msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO ----
STDOUT:
STDERR:
---- End output of msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO ----
Ran msiexec /qn /i "C:\chef\cache\sqlncli.msi" IACCEPTSQLNCLILICENSETERMS=NO returned 1603[0m
[0m
Resource Declaration:[0m
---------------------[0m
# In C:/chef/cookbooks/sql_server/recipes/client.rb
26: windows_package node['sql_server'][pkg]['package_name'] do
27: source node['sql_server'][pkg]['url']
28: checksum node['sql_server'][pkg]['checksum']
29: installer_type :msi
30: options "IACCEPTSQLNCLILICENSETERMS=#{node['sql_server']['accept_eula'] ? 'YES' : 'NO'}"
31: action :install
32: end
33:
[0m
[0m
Compiled Resource:[0m
------------------[0m
# Declared in C:/chef/cookbooks/sql_server/recipes/client.rb:26:in `block in from_file'
windows_package("Microsoft SQL Server 2008 R2 Native Client") do
action [:install]
retries 0
retry_delay 2
cookbook_name :sql_server
recipe_name "client"
source "http://download.microsoft.com/download/B/6/3/B63CAC7F-44BB-41FA-92A3-CBF71360F022/1033/x86/sqlncli.msi"
checksum "35c4b98f7f5f951cae9939c637593333c44aee920efbd4763b7bdca1e23ac335"
installer_type :msi
options "IACCEPTSQLNCLILICENSETERMS=NO"
package_name "Microsoft SQL Server 2008 R2 Native Client"
timeout 600
success_codes [0, 42, 127]
end
[0m
[0m
我正在尝试在WindowsServer 2003 VM中安装sql_server cookbook ....我知道我正在使用的这本食谱https://github.com/opscode-cookbooks/sql_server它只测试了WS2008但是如果有人可以帮我跟踪在我获得WS2003的这本食谱之前我所犯的错误我会非常感激!
答案 0 :(得分:0)
更新食谱,以便msiexec使用/ qb开关,而不是/ qn。这将仅使用最基本的用户界面安装,而不是根本不安装 - 这应该不是问题。
我不知道为什么会这样,但它对我有用。
那么,详细说明一点,在/recipes/client.rb中,将第26-32行更改为:
windows_package node['sql_server'][pkg]['package_name'] do
source node['sql_server'][pkg]['url']
checksum node['sql_server'][pkg]['checksum']
installer_type :msi
options %W[
/qb
IACCEPTSQLNCLILICENSETERMS="YES"
].join(' ')
action :install
end
注意我已经覆盖了将IACCEPTSQLNCLILICENSETERMS设置为'NO'的属性开关,如果节点['sql_server'] ['accept_eula']属性设置为这样 - 主要是为了使这个变化的概念尽可能简单(另外,我不能想到你真的想把它设置为'NO'的任何用例吗?)