Hi,
I am trying to execute recipes in order to configure server. despite of directing chef to the json file, it always says "missing cookbook". I have all my recipes in the cookbook\recipes folder.
I am running below command from the cookbook folder so chef-local mode assume the current directory as cookbook folder:
chef-client --local-mode -j c:\chef\cookbooks
I have a json content as below:
{
"run_list": [ "recipe[mainrecipe]" ]
}
Error:
[2019-03-06T21:26:39+00:00] WARN: No config file found or specified on command line, using command line options.
[2019-03-06T21:26:39+00:00] WARN: No cookbooks directory found at or above current directory. Assuming C:/chef/c
ookbook/recipes.
Starting Chef Client, version 14.10.9←[0m
resolving cookbooks for run list: ["mainrecipe"]←[0m
←[0m
================================================================================←[0m
←[31mError Resolving Cookbooks for Run List:←[0m
================================================================================←[0m
←[0mMissing Cookbooks:←[0m
------------------←[0m
No such cookbook: mainrecipe←[0m
←[0mExpanded Run List:←[0m
------------------←[0m
- configureservice←[0m
←[0mSystem Info:←[0m
------------←[0m
chef_version=14.10.9
←[0mplatform=windows
←[0mplatform_version=6.2.9200
←[0mruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
←[0mprogram_name=C:/opscode/chef-workstation/modules/chef/../../bin/chef-client
←[0mexecutable=C:/opscode/chef-workstation/bin/chef-client←[0m
←[0m←[0m
Running handlers:←[0m
[2019-03-06T21:26:58+00:00] ERROR: Running exception handlers
Running handlers complete
←[0m[2019-03-06T21:26:58+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 1
7 seconds←[0m
[2019-03-06T21:26:58+00:00] FATAL: Stacktrace dumped to C:/Users/Administrator/.chef/local-mode-cache/cache/chef-stackt
race.out
[2019-03-06T21:26:58+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-03-06T21:26:58+00:00] FATAL: Net::HTTPServerException: 412 "Precondition Failed"