1

运行 chef-client --local-mode --override-runlist first_cookbook 时出现以下错误

[2020-04-07T16:31:06+05:30] WARN: No config file found or specified on command line. Using command line options instead.
[2020-04-07T16:31:06+05:30] WARN: No cookbooks directory found at or above current directory.  Assuming C:/Windows/System32.
Starting Chef Infra Client, version 15.8.23

[2020-04-07T16:31:24+05:30] WARN: Run List override has been provided.
[2020-04-07T16:31:24+05:30] WARN: Original Run List: []
[2020-04-07T16:31:24+05:30] WARN: Overridden Run List: [recipe[first_cookbook]]
resolving cookbooks for run list: ["first_cookbook"]

================================================================================
Error Resolving Cookbooks for Run List:
================================================================================

Missing Cookbooks:
------------------
No such cookbook: first_cookbook

Expanded Run List:
------------------
* first_cookbook

System Info:
------------
chef_version=15.8.23
platform=windows
platform_version=10.0.18363
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
program_name=C:/opscode/chef-workstation/modules/chef/../../bin/chef-client
executable=C:/opscode/chef-workstation/bin/chef-client


Running handlers:

[2020-04-07T16:31:24+05:30] ERROR: Running exception handlers
Running handlers complete
[2020-04-07T16:31:24+05:30] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 18 seconds
[2020-04-07T16:31:24+05:30] FATAL: Stacktrace dumped to C:/Users/sneha/.chef/local-mode-cache/cache/chef-stacktrace.out
[2020-04-07T16:31:24+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report

[2020-04-07T16:31:24+05:30] FATAL: Net::HTTPServerException: 412 "Precondition Failed"

我的食谱之路是C:\Windows\System32\first_cookbook有人可以帮助我吗?我是厨师新手,工作 Windows 操作系统对我来说也是新环境

4

1 回答 1

3

经过大量分析后,我知道这是一个非常小的问题,我们的食谱(在我的情况下为 first_cookbook)应该位于名为cookbooks

于 2020-04-08T04:06:15.260 回答