Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Percona Cluster Charm |
Triaged
|
Low
|
Unassigned | ||
percona-cluster (Juju Charms Collection) |
Invalid
|
Low
|
Unassigned |
Bug Description
I rebooted the bootstrap node of an OpenStack deployment, which acted as neutron-gateway, as well has having mysql, cinder and nova-cloud-
After the node was rebooted, the mysql service (percona-cluster with one mysql instance) reported an error in the config-changed hook:
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed Traceback (most recent cal
l last):
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed main()
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed hooks.execute(
)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed self._hooks[
()
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed shared_
, unit)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed password = configure_d
b(hostname, database, username)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed m_helper.
ord=get_
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/var/lib/juju/agen
ts/unit-
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed passwd=password)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/usr/lib/python2.7
/dist-packages/
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed return Connection(*arg
s, **kwargs)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed File "/usr/lib/python2.7
/dist-packages/
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed super(Connection, self
).__init__(*args, **kwargs2)
unit-mysql-0: 2015-01-22 14:29:08 INFO config-changed _mysql_
After doing 'juju resolved --retry mysql/0', everything got back to normal.
Changed in percona-cluster (Juju Charms Collection): | |
status: | New → Incomplete |
tags: | added: kanban-cross-team |
tags: | removed: kanban-cross-team |
Changed in charm-percona-cluster: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in percona-cluster (Juju Charms Collection): | |
status: | Triaged → Invalid |
summary: |
- Error after reboot: Can't connect to local MySQL server through socket - '/var/run/mysqld/mysqld.sock' (2) + Can't connect to local MySQL server through socket + '/var/run/mysqld/mysqld.sock' |
Hi.
Can you provide us with the mysql logs (.err files residing in mysql datadir) too? This looks like a race condition (mysql was not up when juju wanted to run config_change hook on it), but we'll need more info to investigate. It would be nice to have 'juju status' output from before you did 'juju resolved', do you, maybe, still have it saved? Also, if you could bundle (in a .zip or similar archive) all the log files from the failed unit, that would also help (as allmachines.log is a bit hard to parse).
Have you tried reproducing this issue? If so, does it fail every time?
Do you maybe have a juju delployer configuration file that you can share (assuming that you did use juju deployer to deploy your stack)?
There is a updated version of the percona-cluster charm available, it might be wise to upgrade the current charm version (make sure you have your mysql databases backed up, just in case!).