厨师服务器&gt;例外:NoMethodError:未定义的方法`save&#39;对于#<hash:0x7f9b5d518d08>运行&#39; knife configure -i&#39; </hash:0x7f9b5d518d08>

时间:2013-04-01 23:25:14

标签: debian chef knife

不确定此问题是否已解决,或者我是否做错了什么。查看当前的票证并没有看到同样的错误。

我正在按照此处找到的Opscode wiki提供的“使用软件包在Debian或Ubuntu上安装Chef服务器”的安装指南: http://wiki.opscode.com/display/chef/Installing+Chef+Server+on+Debian+or+Ubuntu+using+Packages

在我到达“配置命令行客户端”部分之前,安装似乎进展顺利。我从用户主目录运行'knife configure -i'并输入以下内容:

admin@chef:~$ knife configure -i
Overwrite /home/admin/.chef/knife.rb? (Y/N) y
Please enter the chef server URL: http://chef.website.org:4000
Please enter a clientname for the new client: [admin]
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem] .chef/webui.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem] .chef/validation.pem
Please enter the path to a chef repository (or leave blank):

...我收到以下错误:

Creating initial API user...
ERROR: knife encountered an unexpected error
This may be a bug in the 'configure' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `save' for #<Hash:0x7f9b5d518d08>

运行'knife configure -i'时,-VV选项似乎不能与-i选项一起使用

当我使用-VV命令运行教程中的下一个命令时,我收到:

admin@chef:~$ knife client list -VV
DEBUG: Using configuration from /home/admin/.chef/knife.rb
WARN: Failed to read the private key /home/admin/.chef/admin.pem: #<Errno::ENOENT: No such file or directory - /home/admin/.chef/admin.pem>
/usr/lib/ruby/vendor_ruby/chef/rest/auth_credentials.rb:64:in `load_signing_key': I cannot read /home/admin/.chef/admin.pem, which you told me to use to sign requests! (Chef::Exceptions::PrivateKeyMissing)
from /usr/lib/ruby/vendor_ruby/chef/rest/auth_credentials.rb:34:in `initialize'
from /usr/lib/ruby/vendor_ruby/chef/rest.rb:64:in `new'
from /usr/lib/ruby/vendor_ruby/chef/rest.rb:64:in `initialize'
from /usr/lib/ruby/vendor_ruby/chef/api_client.rb:198:in `new'
from /usr/lib/ruby/vendor_ruby/chef/api_client.rb:198:in `list'
from /usr/lib/ruby/vendor_ruby/chef/knife/client_list.rb:38:in `run'
from /usr/lib/ruby/vendor_ruby/chef/knife.rb:408:in `run_with_pretty_exceptions'
from /usr/lib/ruby/vendor_ruby/chef/knife.rb:168:in `run'
from /usr/lib/ruby/vendor_ruby/chef/application/knife.rb:123:in `run'
from /usr/bin/knife:24

我猜这是来自“刀配置-i”拒绝运行。 我在这做错了什么?我错过了什么?

1 个答案:

答案 0 :(得分:0)