Error message "RecipeNotFound: could not find recipe file" when bootstrapping new client

I’m just getting started with Chef on Windows and am running into a problem. I’ve already setup a Chef server and am trying to get a node bootstrapped to talk to it. I just bootstrapped a new Windows client like this:

knife bootstrap windows winery $ComputerName -x $UserName -P $Password -N $ComputerName

As a result, I’m always receiving this error message:

Chef::Exceptions::RecipeNotFound: could not find recipe file C:/Users/$UserName/$ComputerName

There is no folder at that path so that makes sense. What path do I point this at and where can I do that? I’m not sure what recipe file it’s looking for since it does this with no runlists for this node. The cache is at C:\chef.

Any help is appreciated.

The error was happening on runs after the bootstrap where knife winrm was being called with some params in the wrong order.

For reference if you want to kick of chef-client via winrm you can use a commandline like

knife winrm chef-client -m -x Administrator -P CanNotGuessMe!

The order of the unnamed args is important. First we have the server or servers to connect to, then the command (or command line with args) to run. Then we have our switches and named parameters.

1 Like