1

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

我正在遵循 Opscode wiki 提供的“在 Debian 或 Ubuntu 上使用软件包安装 Chef 服务器”的安装指南:http: //wiki.opscode.com/display/chef/Installing+Chef+Server+on+Debian+或+Ubuntu+使用+包

安装似乎很顺利,直到我到达“配置命令行客户端”部分。我从我的用户主目录运行'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

我猜这是来自拒绝运行的“knife config -i”。我在这里做错了什么?我错过了什么?

4

1 回答 1

0

这是因为 ruby​​-json 包中与安全相关的更改。看一下:

http://community.opscode.com/chat/chef/2013-02-26

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701629

于 2013-06-12T15:37:23.657 回答