1
無法使用redisio食譜安裝redis。安裝sensu服務器,sensu :: redis cookbook試圖安裝redis,並在出現以下錯誤時失敗。 這裏什麼都沒有了在安裝sensu服務器時安裝使用主廚食譜配方[sensu :: redis]的redis時出錯
Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching service[redis6379] (did you define it first?)
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/redisio/recipes/enable.rb:25:in `block in from_file'
/var/chef/cache/cookbooks/redisio/recipes/enable.rb:23:in `each'
/var/chef/cache/cookbooks/redisio/recipes/enable.rb:23:in `from_file'
/var/chef/cache/cookbooks/sensu/recipes/redis.rb:23:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/redisio/recipes/enable.rb:
18: # limitations under the License.
19: #
20:
21: redis = node['redisio']
22:
23: redis['servers'].each do |current_server|
24: server_name = current_server["name"] || current_server["port"]
25>> resource = resources("service[redis#{server_name}]")
26: resource.action Array(resource.action)
27: resource.action << :start
28: resource.action << :enable
29: end
30:
Thanyou Liyan。我知道這本食譜的新版本遇到了這個問題。所以我把它改爲1. 7. 1,它爲我工作。看似sensu現在正在更新,並有相同的修復。 – Saurav 2014-10-07 21:51:29
謝謝@Liyan。爲我工作。沒有必要添加install_dir壽。 – user1052313 2014-10-14 15:57:37
將'recipe [redisio :: install]'變更爲'recipe [redisio]'對我來說已經足夠了,感謝您拯救我的理智@Liyan! – spume 2016-08-26 11:21:03