28 August 2013


Fresh Linode instance of Ubuntu 12.04 LTS.

Super simple recipe ( stripped down for debugging ).

include_recipe "apt"
include_recipe "ohai"

include_recipe "mysql::percona_repo"
include_recipe "mysql::server"

I tested installation numerous times with the same OS version with Vagrant with no problems, but when it was time to run it on Linode instance I run into problems like this:

apt-get -q -y install percona-server-server=1:5.5.33-rel31.1-566.precise returned 100, expected 0

Resource Declaration:
# In /opt/chef-solo/cookbooks/mysql/recipes/server.rb

153:   package package_name do
154:     action :install
155:     notifies :start, "service[mysql]", :immediately
156:   end
157: end

After spending couple days checking and comparing Vagrant box, versions, packages, sources list - you name it, I bet I checked that as well. I was going mad with this problem and was at the point of throwing my workstation out of the window…

Anyways I was able to trace down the problem which turned out to be my.cnf problem :)

MySQL error.log gave me this helpful hint:

130828 23:23:29 [ERROR] Can't create IP socket: Success
130828 23:23:29 [ERROR] Aborting 

(Very helpful I know)

Then I dig a little deeper to discover config problem itself - bind-address was empty:

bind-address  =

By looking at the mysql cookbook attributes I discovered this line:

default['mysql']['bind_address'] = attribute?('cloud') ? cloud['local_ipv4'] : ipaddress

Apparently Linode instances are getting cloud attribute ( which kind of makes sense ) but missing local_ipv4 property.

Finally the FIX - default['mysql']['bind_address'] = node['ipaddress'] in your application cookbook. ( I will probably propose a patch for mysql cookbook later )

Hopefully you will this info faster than I did!

Contact me on Codementor

Some popular ones

My books recommendations

Great book for operations people. Helped me to design and build solid deployment pipelines. Awesome advices on automated testing as well. The author advocates against feature branches, every commit goes to master! Scary? I know, but it actually makes sense once you get the idea. Read the book to find out more.

One of those rare books where every word counts!

Classics from John Allspaw who is SVP of Infrastructure and Operations at Etsy (and used to work for Flickr). The book covers very important topics like metrics collection, continuous deployment, monitoring, dealing with unexpected traffic spikes, dev and ops collaboration and much more. Def recommend if you are starting out in the operations field or been doing it for a while ( in latter case you probably read this book already :).

This book is must read for every software engineer, no matter which language you use! It will change your perspective on writing code. I was amazed by the quality of material - very detailed and up to the point.

"The only way to make the deadline -- the only way to go fast -- is to keep the code as clean as possible at all times."

blog comments powered by Disqus