【问题标题】:Cookbook sync fails with undefined method `cheffish' for nil:NilClass食谱同步因 nil:NilClass 的未定义方法“cheffish”而失败
【发布时间】:2016-08-16 12:29:35
【问题描述】:

突然,今天,Chef 客户端开始失败,并显示如下消息。使用 -l debug 手动运行 Chef 客户端并没有提供更多线索。

[2016-08-15T16:30:26+02:00] ERROR: Exception handlers complete
  Chef Client failed. 0 resources updated in 7.09035028 seconds
[2016-08-15T16:30:26+02:00] ERROR: undefined method `cheffish' for nil:NilClass
[2016-08-15T16:30:26+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccess
(exit code 1)

为什么会这样?

【问题讨论】:

    标签: chef-infra


    【解决方案1】:

    您正在运行哪个版本的 Chef 客户端?

    这是“12.4.0”中的一个错误。当 metadata.rb 中的“name”属性丢失时,可能会出现此错误。它在以后的版本中得到修复,其中 metadata.rb 在执行主厨之前首先被验证。但是,除了上述原因之外,还可能有更多原因发生。

    您可能还想参考:

    undefined method "cheffish" for nil:NilClass, when provisioning chef with vagrant

    【讨论】:

    • 我使用的是 12.4.1。顺便说一句,我通过删除所有使用刀菜谱删除的菜谱解决了这个问题,然后再次运行厨师客户端。
    猜你喜欢
    • 1970-01-01
    • 2013-04-28
    • 2015-09-17
    • 2021-07-22
    • 2021-11-30
    • 2013-12-03
    • 2014-04-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多