Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8672691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:16:04+00:00 2026-06-12T19:16:04+00:00

When debugging errors in chef recipes, I usually like logging on to a problematic

  • 0

When debugging errors in chef recipes, I usually like logging on to a problematic machine, typing “shef -z”. In the case that there was a previous successful run, the registered run_list is automatically loaded with all the relevant attributes and recipes so that I can jump right in to try the offending lines.

The problem is that if chef-client failed on the first run, the run_list is empty, and shef even deletes the (much needed) recipes from the cache saying “its cookbook is no longer needed on this client”. Is there some way to force shef to let me use my run_list?

The official wiki mentions:

“The run list will be set in the same way as normal chef client
runs.”

but trying “-j” doesn’t seem to help.

I also tried running the solo mode (“-s -j”) instead, as explained in this blog post. It loads the run_list (without expanding it, which is weird), but when I try to do anything, I get stuff like:

“Cookbook tomcat not found. If you’re loading tomcat from another
cookbook, make sure you configure the dependency in your metadata”.

Note that my recipe has a couple of dozen dependencies 3 levels deep, so pasting all the code manually to shef is not really an option. My current workaround is to upload a modified recipe with all possibly offending parts commented-out (and continue manually from there), but I would love to have a better alternative.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:16:05+00:00Added an answer on June 12, 2026 at 7:16 pm

    The recipes aren’t included by default when you start shef in client or solo modes, because a use case of shef is to determine why a recipe may not be loading at all, such as a compile time bug that causes some exception.

    Therefore, you need to use include_recipe to include the recipes you wish to use. You can do this automatically for all the roles/recipes in the node’s run list with:

    node.run_list.expand(node.chef_environment).recipes.each do |r|
      include_recipe r
    end
    

    For more information on this, and a bunch of other great tips for using Shef to debug chef-client runs, see Steven Danna’s blog post

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a programmatic way to validate HiveQL statements for errors like basic syntax
i'm looking for a free and lightweight packetsniffer for debugging internal server errors like
I enabled heap debugging to try and debug some memory leak errors. I do
Updated-2 I have interesting combination of warnings & errors. Firstly, when debugging, i get
When debugging in Visual Studio 2008 I get the error There is no source
Debugging a PHP program, is there any add-on/plug-in for browser which I can view
I'm debugging a site that is deployed to the site root on the production
While debugging my Visual Studio 2010 MVC2 solution, I noticed something that I didn't
One thing that always been a pain is to log SQL (JDBC) errors when
I am trying to remove all logging and tracing errors on a company website

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.