0

I am trying to install graphite using chef. I am new to chef and have very little idea of the working. I am using the chef version(10.24.4). I get the following error when i try to install graphite on the client side.

================================================================================
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

I explicitly tried touching the mysql.sock file on the client side and it works fine. I am not able to understand what's actually causing this problem. Any help is sincerely appreciated.

Thanks in advance!

1 Answers1

0

You're using chef 10 instead of chef 11 so chef-solo isn't picking up the dependencies specified in metadata.rb. One of the great improvements of chef 11 is that it will do just that.

Basically this cookbook expects the mysql cookbook to be ran before it or that mysql is set up in some way before this is happens.

EnabrenTane
  • 7,428
  • 2
  • 26
  • 44