[root@ip-172-31-12-214 cookbook]# chef-client -z --runlist "recipe[abc::recipe1]"
[2023-11-23T06:08:13+00:00] WARN: No config file found or specified on command line. Using command line options instead.
[2023-11-23T06:08:13+00:00] WARN: No cookbooks directory found at or above current directory. Assuming /home/ec2-user/cookbook.
Starting Chef Infra Client, version 15.0.300
resolving cookbooks for run list: ["abc::recipe1"]
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: abc
Expanded Run List:
------------------
* abc::recipe1
System Info:
------------
chef_version=15.0.300
platform=amazon
platform_version=2023
ruby=ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef-workstation/bin/chef-client
Running handlers:
[2023-11-23T06:08:15+00:00] ERROR: Running exception handlers
Running handlers complete
[2023-11-23T06:08:15+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 01 seconds
[2023-11-23T06:08:15+00:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2023-11-23T06:08:15+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2023-11-23T06:08:15+00:00] FATAL: Net::HTTPServerException: 412 "Precondition Failed"
facing an error in chef when trying to run the code
59 Views Asked by Sadeque Khan At
1
You have a warning in your stacktrace:
It look like the cookbook "abc" is not present
/home/ec2-user/cookbookYou need to ensure the cookbook is located in your cookbook path