Chef client suddenly can't find recipes/cookbooks (cheffish)?

Hi,

I had setup a CENTOS 6.5 machine last week (or maybe a couple of weeks ago) and was using it to test the chef-splunk cookbook.

Things were good, and I even have screenshots.

Today, I wanted to pickup where I left off, but nothing is working anymore on the machine (with Chef).

When I run chef-client to run a recipe that I KNOW is on the server, I get error saying it can't resolve.

[root@centos65 chef]# chef-client -o user
Starting Chef Client, version 12.4.0
[2015-07-07T18:00:49-04:00] WARN: Run List override has been provided.
[2015-07-07T18:00:49-04:00] WARN: Original Run List:
[2015-07-07T18:00:49-04:00] WARN: Overridden Run List: [recipe[user]]
resolving cookbooks for run list: ["user"]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

The following cookbooks are required by the client but don't exist on the server :

  • user

Expanded Run List:

  • user

Running handlers:
[2015-07-07T18:00:49-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-07-07T18:00:49-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 1.313674771 seconds
[2015-07-07T18:00:49-04:00] ERROR: undefined method `cheffish' for nil:NilClass
[2015-07-07T18:00:49-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef ru n process exited unsuccessfully (exit code 1)
[root@centos65 chef]#

I googled and found this one reference:

which I don't quite understand?

Is that saying that somehow the chef client on that machine got changed to 12.4.0 and now it is broken?

Does chef-client automatically update itself (e.g., as I said it was working last week or so, but now is not)?

Also, being a newbie, I don't understand the solutions that are mentioned like "I switched to 12.3.0 and now it works" and "I added the line chef.version = "12.3.0" to the provision block ". Can someone kindly explain how to do that?

I even stood up a new CENTOS box and it ended up with 12.4.0 client I guess, because it has the exact same problem.

Sorry for the panic :(!!

Thanks,
Jim

Hi,

To answer my own question, this problem was because I was using the wrong parameter for the recipes in the “chef-client -o” command.

I should’ve used the ‘recipe[cookbook_name::recipe_name]’ format.

Sorry,
Jim


On Tue, 7/7/15, o haya ohaya@yahoo.com wrote:

Subject: Chef client suddenly can’t find recipes/cookbooks (cheffish)?
To: chef@lists.opscode.com
Cc: ohaya@yahoo.com
Date: Tuesday, July 7, 2015, 6:14 PM

Hi,

I had setup a CENTOS 6.5 machine last week (or maybe a
couple of weeks ago) and was using it to test the
chef-splunk cookbook.

Things were good, and I even have screenshots.

Today, I wanted to pickup where I left off, but nothing is
working anymore on the machine (with Chef).

When I run chef-client to run a recipe that I KNOW is on the
server, I get error saying it can’t resolve.

[root@centos65 chef]#
chef-client -o user
Starting Chef Client, version 12.4.0
[2015-07-07T18:00:49-04:00] WARN: Run List override has been
provided.
[2015-07-07T18:00:49-04:00] WARN: Original Run List: []
[2015-07-07T18:00:49-04:00] WARN: Overridden Run List:
[recipe[user]]
resolving cookbooks for run list: [“user”]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

The following cookbooks are required by the client but don’t
exist on the server
:

  • user

Expanded Run List:

  • user

Running handlers:
[2015-07-07T18:00:49-04:00] ERROR: Running exception
handlers
Running handlers complete
[2015-07-07T18:00:49-04:00] ERROR: Exception handlers
complete
Chef Client failed. 0 resources updated in 1.313674771
seconds
[2015-07-07T18:00:49-04:00] ERROR: undefined method
`cheffish’ for nil:NilClass
[2015-07-07T18:00:49-04:00] FATAL:
Chef::Exceptions::ChildConvergeError: Chef ru

n process exited unsuccessfully (exit code 1)
[root@centos65 chef]#

I googled and found this one reference:

http://stackoverflow.com/questions/31149600/undefined-method-cheffish-for-nilnilclass-when-provisioning-chef-with-vagra

which I don’t quite understand?

Is that saying that somehow the chef client on that machine
got changed to 12.4.0 and now it is broken?

Does chef-client automatically update itself (e.g., as I
said it was working last week or so, but now is not)?

Also, being a newbie, I don’t understand the solutions that
are mentioned like "I switched to 12.3.0 and now it works"
and "I added the line chef.version = “12.3.0” to the
provision block ". Can someone kindly explain how to
do that?

I even stood up a new CENTOS box and it ended up with 12.4.0
client I guess, because it has the exact same problem.

Sorry for the panic :(!!

Thanks,
Jim

Hi,

To answer my own question, this problem was because I was using the wrong parameter for the recipes in the “chef-client -o” command.

I should’ve used the ‘recipe[cookbook_name::recipe_name]’ format.

Sorry,
Jim


On Tue, 7/7/15, o haya ohaya@yahoo.com wrote:

Subject: Chef client suddenly can’t find recipes/cookbooks (cheffish)?
To: chef@lists.opscode.com
Cc: ohaya@yahoo.com
Date: Tuesday, July 7, 2015, 6:14 PM

Hi,

I had setup a CENTOS 6.5 machine last week (or maybe a
couple of weeks ago) and was using it to test the
chef-splunk cookbook.

Things were good, and I even have screenshots.

Today, I wanted to pickup where I left off, but nothing is
working anymore on the machine (with Chef).

When I run chef-client to run a recipe that I KNOW is on the
server, I get error saying it can’t resolve.

[root@centos65 chef]#
chef-client -o user
Starting Chef Client, version 12.4.0
[2015-07-07T18:00:49-04:00] WARN: Run List override has been
provided.
[2015-07-07T18:00:49-04:00] WARN: Original Run List: []
[2015-07-07T18:00:49-04:00] WARN: Overridden Run List:
[recipe[user]]
resolving cookbooks for run list: [“user”]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

The following cookbooks are required by the client but don’t
exist on the server
:

  • user

Expanded Run List:

  • user

Running handlers:
[2015-07-07T18:00:49-04:00] ERROR: Running exception
handlers
Running handlers complete
[2015-07-07T18:00:49-04:00] ERROR: Exception handlers
complete
Chef Client failed. 0 resources updated in 1.313674771
seconds
[2015-07-07T18:00:49-04:00] ERROR: undefined method
`cheffish’ for nil:NilClass
[2015-07-07T18:00:49-04:00] FATAL:
Chef::Exceptions::ChildConvergeError: Chef ru

n process exited unsuccessfully (exit code 1)
[root@centos65 chef]#

I googled and found this one reference:

http://stackoverflow.com/questions/31149600/undefined-method-cheffish-for-nilnilclass-when-provisioning-chef-with-vagra

which I don’t quite understand?

Is that saying that somehow the chef client on that machine
got changed to 12.4.0 and now it is broken?

Does chef-client automatically update itself (e.g., as I
said it was working last week or so, but now is not)?

Also, being a newbie, I don’t understand the solutions that
are mentioned like "I switched to 12.3.0 and now it works"
and "I added the line chef.version = “12.3.0” to the
provision block ". Can someone kindly explain how to
do that?

I even stood up a new CENTOS box and it ended up with 12.4.0
client I guess, because it has the exact same problem.

Sorry for the panic :(!!

Thanks,
Jim

Hi,

To answer my own question, this problem was because I was using the wrong parameter for the recipes in the “chef-client -o” command.

I should’ve used the ‘recipe[cookbook_name::recipe_name]’ format.

Sorry,
Jim


On Tue, 7/7/15, o haya ohaya@yahoo.com wrote:

Subject: Chef client suddenly can’t find recipes/cookbooks (cheffish)?
To: chef@lists.opscode.com
Cc: ohaya@yahoo.com
Date: Tuesday, July 7, 2015, 6:14 PM

Hi,

I had setup a CENTOS 6.5 machine last week (or maybe a
couple of weeks ago) and was using it to test the
chef-splunk cookbook.

Things were good, and I even have screenshots.

Today, I wanted to pickup where I left off, but nothing is
working anymore on the machine (with Chef).

When I run chef-client to run a recipe that I KNOW is on the
server, I get error saying it can’t resolve.

[root@centos65 chef]#
chef-client -o user
Starting Chef Client, version 12.4.0
[2015-07-07T18:00:49-04:00] WARN: Run List override has been
provided.
[2015-07-07T18:00:49-04:00] WARN: Original Run List: []
[2015-07-07T18:00:49-04:00] WARN: Overridden Run List:
[recipe[user]]
resolving cookbooks for run list: [“user”]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

The following cookbooks are required by the client but don’t
exist on the server
:

  • user

Expanded Run List:

  • user

Running handlers:
[2015-07-07T18:00:49-04:00] ERROR: Running exception
handlers
Running handlers complete
[2015-07-07T18:00:49-04:00] ERROR: Exception handlers
complete
Chef Client failed. 0 resources updated in 1.313674771
seconds
[2015-07-07T18:00:49-04:00] ERROR: undefined method
`cheffish’ for nil:NilClass
[2015-07-07T18:00:49-04:00] FATAL:
Chef::Exceptions::ChildConvergeError: Chef ru

n process exited unsuccessfully (exit code 1)
[root@centos65 chef]#

I googled and found this one reference:

http://stackoverflow.com/questions/31149600/undefined-method-cheffish-for-nilnilclass-when-provisioning-chef-with-vagra

which I don’t quite understand?

Is that saying that somehow the chef client on that machine
got changed to 12.4.0 and now it is broken?

Does chef-client automatically update itself (e.g., as I
said it was working last week or so, but now is not)?

Also, being a newbie, I don’t understand the solutions that
are mentioned like "I switched to 12.3.0 and now it works"
and "I added the line chef.version = “12.3.0” to the
provision block ". Can someone kindly explain how to
do that?

I even stood up a new CENTOS box and it ended up with 12.4.0
client I guess, because it has the exact same problem.

Sorry for the panic :(!!

Thanks,
Jim

Hi,

I figured this out, I was using the wrong format for the parameter for the “chef-client -o” parameter. It should’ve been ‘recipe[cookbook::recipe]’ format.

Sorry,
Jim


On Tue, 7/7/15, o haya ohaya@yahoo.com wrote:

Subject: Chef client suddenly can’t find recipes/cookbooks (cheffish)?
To: chef@lists.opscode.com
Cc: ohaya@yahoo.com
Date: Tuesday, July 7, 2015, 6:14 PM

Hi,

I had setup a CENTOS 6.5 machine last week (or maybe a
couple of weeks ago) and was using it to test the
chef-splunk cookbook.

Things were good, and I even have screenshots.

Today, I wanted to pickup where I left off, but nothing is
working anymore on the machine (with Chef).

When I run chef-client to run a recipe that I KNOW is on the
server, I get error saying it can’t resolve.

[root@centos65 chef]#
chef-client -o user
Starting Chef Client, version 12.4.0
[2015-07-07T18:00:49-04:00] WARN: Run List override has been
provided.
[2015-07-07T18:00:49-04:00] WARN: Original Run List: []
[2015-07-07T18:00:49-04:00] WARN: Overridden Run List:
[recipe[user]]
resolving cookbooks for run list: [“user”]

================================================================================
Error Resolving Cookbooks for Run List:

Missing Cookbooks:

The following cookbooks are required by the client but don’t
exist on the server
:

  • user

Expanded Run List:

  • user

Running handlers:
[2015-07-07T18:00:49-04:00] ERROR: Running exception
handlers
Running handlers complete
[2015-07-07T18:00:49-04:00] ERROR: Exception handlers
complete
Chef Client failed. 0 resources updated in 1.313674771
seconds
[2015-07-07T18:00:49-04:00] ERROR: undefined method
`cheffish’ for nil:NilClass
[2015-07-07T18:00:49-04:00] FATAL:
Chef::Exceptions::ChildConvergeError: Chef ru

n process exited unsuccessfully (exit code 1)
[root@centos65 chef]#

I googled and found this one reference:

http://stackoverflow.com/questions/31149600/undefined-method-cheffish-for-nilnilclass-when-provisioning-chef-with-vagra

which I don’t quite understand?

Is that saying that somehow the chef client on that machine
got changed to 12.4.0 and now it is broken?

Does chef-client automatically update itself (e.g., as I
said it was working last week or so, but now is not)?

Also, being a newbie, I don’t understand the solutions that
are mentioned like "I switched to 12.3.0 and now it works"
and "I added the line chef.version = “12.3.0” to the
provision block ". Can someone kindly explain how to
do that?

I even stood up a new CENTOS box and it ended up with 12.4.0
client I guess, because it has the exact same problem.

Sorry for the panic :(!!

Thanks,
Jim