我已經在linux機器上運行我的廚師服務器。我在我的Windows 7機器上安裝了我的工作站設置(刀具配置) 。我已經進入了命令刀節點列表。它工作正常,並顯示我與我的服務器連接的節點。 但是當我嘗試上傳食譜時,它顯示下面的錯誤。我搜索了很多這個錯誤,弄糊塗了,這有什麼問題?無法從windows工作站上傳食譜
$knife cookbook upload mycookbook
ERROR: knife encountered an unexpected error
This may be a bug in the 'cookbook upload' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `on_create' for Chef::Cookbook::FileVendor:Class
任何建議...
INFO: Using configuration from F:/chef-repo/.chef/knife.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_request
DEBUG: Signing the request as admin
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to serverurl?num_versions=all
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: X-OPS-USERID: admin
DEBUG: X-OPS-TIMESTAMP: 2015-01-12T05:49:21Z
DEBUG: X-OPS-CONTENT-HASH: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
DEBUG: X-OPS-AUTHORIZATION-1: h8n6BlUYhBvdDhRgstYdefwD+g48+BNqRmiEKaHJ2xGjgfwQm79BPTZfp5rE
DEBUG: X-OPS-AUTHORIZATION-2: ABDYQEs8VPwPknNStKOiG6ldH1omKs3uaTB+dihAAvSaK45wtu0T+J3WMK5J
DEBUG: X-OPS-AUTHORIZATION-3: 3jJjujyC9DzkuNpyjj9UikVRi6a+39OVLaJkONu6il+w4L4TInHJ+ktxcmfw
DEBUG: X-OPS-AUTHORIZATION-4: rBKKgDIuDOJNRNauIYxwlSuSSOWqidum++fM+OIy9HxGSuxdX9Km71Z3txJa
DEBUG: X-OPS-AUTHORIZATION-5: Iie3p4PItta9iQbtCof9je8DYh/kJr0SgibWwHIb46XRia8W+GPywS3eI0WQ
DEBUG: X-OPS-AUTHORIZATION-6: 6wjRrXcUwuB2PbdRAAVzU/15mObukJohXBOxclbyzg==
DEBUG: HOST: hostname
DEBUG: X-REMOTE-REQUEST-ID: 921c227b-2a13-4a53-b44d-98d8efee0722
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: server: nginx/1.4.4
DEBUG: date: Mon, 12 Jan 2015 05:46:36 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.4.1
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: HTTP server did not include a Content-Length header in response, cannot identify truncated downloads.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: decompressing gzip response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-11.6.0/lib/chef/knife/cookbook_upload.rb:179:in `cookbook_repo': undefined method `on_create' for Chef::C
ookbook::FileVendor:Class (NoMethodError)
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-11.6.0/lib/chef/knife/cookbook_upload.rb:163:in `block in cookbooks_to_upload'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-11.6.0/lib/chef/knife/cookbook_upload.rb:160:in `each'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-11.6.0/lib/chef/knife/cookbook_upload.rb:160:in `cookbooks_to_upload'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-11.6.0/lib/chef/knife/cookbook_upload.rb:119:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/lib/chef/knife.rb:409:in `block in run_with_pretty_exceptions'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/lib/chef/local_mode.rb:38:in `with_server_connectivity'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/lib/chef/knife.rb:408:in `run_with_pretty_exceptions'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/lib/chef/knife.rb:205:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/lib/chef/application/knife.rb:139:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/chef-12.0.0.rc.0-x86-mingw32/bin/knife:25:in `<top (required)>'
from C:/opscode/chefdk/embedded/bin/knife:23:in `load'
from C:/opscode/chefdk/embedded/bin/knife:23:in `<main>'
如果你在mycookbook目錄下並且在windows下,用'cd ..'刀必須改變目錄並且不能在windows下 – Tensibai
如果@Tensibai解決方案不適合你,可以你試着用'-VV'標誌運行命令,給我們更多的信息? – rastasheep
是的。我已經從我的食譜目錄嘗試了這個命令,並且我用-VV標誌提交了錯誤。 – VVijay