chef [SOLVED]: Chef zero can't find cookbook during kitchen test run

chef [SOLVED]: Chef zero can't find cookbook during kitchen test run

Home Forums Automation Tools Chef Tutorials chef [SOLVED]: Chef zero can't find cookbook during kitchen test run

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #193380

    Cloudy Point


    This is driving me crazy, I just started using chef on a fresh image (win10), and for some reason when using kitchen to test a cookbook it can not find the cookbook? tried the response to this question: Chef solo can't find cookbook during kitchen test run
    and it throws an error saying “Your Berksfile contains multiple entries named ‘printserver’. Please remove duplicate dependencies, or put them in different groups.] on default-win-2012r2-standard-amd64-nocm”
    Kitchen version 1.17.0

    ----> Converging <default-win-2012r2-standard-amd64-nocm>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 6.3.1...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
     -----> Chef Omnibus installation detected (install only if missing)
       Transferring files to <default-win-2012r2-standard-amd64-nocm>
       Starting Chef Client, version 13.4.24
       resolving cookbooks for run list: ["printserver"]
       Error Resolving Cookbooks for Run List:
       Missing Cookbooks:
       No such cookbook: printserver
       Expanded Run List:
       * printserver
       System Info:
       ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
       Running handlers:
       [2017-09-20T13:38:53-07:00] ERROR: Running exception handlers
       Running handlers complete
       [2017-09-20T13:38:53-07:00] ERROR: Exception handlers complete
       Chef Client failed. 0 resources updated in 03 seconds
       [2017-09-20T13:38:53-07:00] FATAL: Stacktrace dumped to C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/chef-stacktrace.out
       [2017-09-20T13:38:53-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-09-20T13:38:53-07:00] FATAL: Net::HTTPServerException: 412 "Precondition Failed"
    Class: Kitchen::ActionFailed
    Message: 1 actions failed.
     Converge failed on instance <default-win-2012r2-standard-amd64-nocm>.  
    Please see .kitchen/logs/default-win-2012r2-standard-amd64-nocm.log for more details
     Please see .kitchen/logs/kitchen.log for more details
    Also try running `kitchen diagnose --all` for configuration


    Cloudy Point

    Accepted AnswerAnswer

    What I ended up doing in order:

    • Took cookbook from work laptop to home PC and tested, worked as expected.
    • Uninstalled chef, vagrant and virtual box and reinstalled with same versions on home PC, still same problem.
    • At this point was annoyed with how much time I had spent trying to fix this so I re-imaged the laptop and re installed everything again (newest versions) and it now works correctly as it should.

    What went wrong in the first place? I have no clue.

    On a side note if anyone has any good references for creating a windows 2012 print server with chef, would be very helpful.

    Author: InsertNameHere
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.