本文介绍了Chef Selenium:Windows Server 2008上的rubyzip无法分配内存问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Windows Server 2008和更高版本上2008R2发生以下异常:
On Windows Server 2008 & 2008R2 the following exception occurs:
================================================================================
Error executing action `install` on resource 'chef_gem[rubyzip]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of C:/opscode/chef/embedded/bin/gem install rubyzip -q --no-rdoc --no-ri -v "1.1.7" ----
STDOUT:
STDERR: [FATAL] failed to allocate memory
---- End output of C:/opscode/chef/embedded/bin/gem install rubyzip -q --no-rdoc --no-ri -v "1.1.7" ----
Ran C:/opscode/chef/embedded/bin/gem install rubyzip -q --no-rdoc --no-ri -v "1.1.7" returned 1
在Windows Server 2012& 2012 R2。
This does NOT happen on Windows Server 2012 & 2012 R2.
推荐答案
调整Winrm设置不能解决问题。
Adjusting the winrm settings did not fix the issue.
Rubyzip似乎是分配了太多对象的问题:
Rubyzip seems to be the issue with too many objects being allocated:http://blog.huangzhimin.com/2012/10/02/avoid-using-rubyzip/
替换rubyzip实现使用powershell解决了该问题:
Replacing the rubyzip implementation with powershell fixed the issue:https://stackoverflow.com/a/26843122/4548096
这篇关于Chef Selenium:Windows Server 2008上的rubyzip无法分配内存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!