0

我正在尝试使用厨师安装石墨。我是厨师新手,对工作知之甚少。我正在使用厨师版(10.24.4)。当我尝试在客户端安装石墨时出现以下错误。

================================================================================
Error executing action `touch` on resource 'file[/var/lib/mysql/mysql.sock]'
================================================================================

Errno::ENXIO
------------
No such device or address - /var/lib/mysql/mysql.sock

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/graphite-mysql/recipes/default.rb

 37:     file mysqld_file do
 38:         action :touch
 39:    retries 4
 40:    retry_delay 100
 41:         owner mysqld_user
 42:         group "root" 
 43:         mode "0774" 
 44:     end
 45: end

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/graphite-mysql/recipes/default.rb:37:in `block in from_file'

file("/var/lib/mysql/mysql.sock") do
  provider Chef::Provider::File
  action [:touch]
  retries 0
  retry_delay 100
  path "/var/lib/mysql/mysql.sock"
  backup 5
  cookbook_name "graphite-mysql"
  recipe_name "default"
  owner "root"
  group "root"
  mode "0774"
end

[2013-05-31T13:41:52-05:00] ERROR: Running exception handlers
[2013-05-31T13:41:52-05:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-05-31T13:41:52-05:00] ERROR: Exception handlers complete
[2013-05-31T13:41:52-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-05-31T13:41:52-05:00] FATAL: Errno::ENXIO: file[/var/lib/mysql/mysql.sock] (graphite-mysql::default line 37) had an error: Errno::ENXIO: No such device or address - /var/lib/mysql/mysql.sock

我明确尝试在客户端触摸 mysql.sock 文件,它工作正常。我无法理解究竟是什么导致了这个问题。真诚感谢任何帮助。

提前致谢!

4

1 回答 1

0

您使用的是 chef 10 而不是 chef 11,因此 chef-solo 没有获取 metadata.rb 中指定的依赖项。Chef 11 的一大改进就是它会做到这一点。

基本上,这本食谱希望 mysql 食谱在它之前运行,或者在这种情况发生之前以某种方式设置 mysql。

于 2013-06-13T09:18:13.447 回答