leader fails to connect to itself during leader elected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL InnoDB Cluster Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have a 3 unit cluster Im trying to stand up ontop of vsphere:
the two non leader units report:
mysql-innodb-
mysql-innodb-
and the leader failed to run its leader-elected hook:
mysql-innodb-
the logs for the leader show it failing to connect to 10.245.206.138:
2020-09-10 23:26:20 DEBUG juju-log Opening db connection for clusteruser@
2020-09-10 23:26:20 DEBUG jujuc server.go:211 running hook tool "juju-log"
2020-09-10 23:26:20 DEBUG juju-log Could not connect to clusteruser@
2020-09-10 23:26:20 DEBUG jujuc server.go:211 running hook tool "juju-log"
2020-09-10 23:26:20 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
instance.
File "lib/charm/
self.
File "/var/lib/
return self.call(f, *args, **kw)
File "/var/lib/
do = self.iter(
File "/var/lib/
raise retry_exc.reraise()
File "/var/lib/
raise self.last_
File "/usr/lib/
return self.__get_result()
File "/usr/lib/
raise self._exception
File "/var/lib/
result = fn(*args, **kwargs)
File "lib/charm/
raise CannotConnectTo
charm.openstack
It also looks like mysql restarted about 40 seconds before this hook ran; maybe its possible it hadnt come fully back up?
Sep 10 23:24:55 juju-6de53f-19 systemd[1]: Stopping MySQL Community Server...
Sep 10 23:25:01 juju-6de53f-19 systemd[1]: mysql.service: Succeeded.
Sep 10 23:25:01 juju-6de53f-19 systemd[1]: Stopped MySQL Community Server.
Sep 10 23:25:01 juju-6de53f-19 systemd[1]: Starting MySQL Community Server...
Sep 10 23:25:01 juju-6de53f-19 CRON[20887]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Sep 10 23:25:19 juju-6de53f-19 systemd[1]: Started MySQL Community Server.
Sep 10 23:25:28 juju-6de53f-19 systemd[1]: tmp-snap.
Sep 10 23:25:43 juju-6de53f-19 systemd[1]: mysql.service: Main process exited, code=exited, status=16/n/a
Sep 10 23:25:43 juju-6de53f-19 systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 10 23:25:43 juju-6de53f-19 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Sep 10 23:25:43 juju-6de53f-19 systemd[1]: Stopped MySQL Community Server.
Sep 10 23:25:43 juju-6de53f-19 systemd[1]: Starting MySQL Community Server...
Sep 10 23:25:52 juju-6de53f-19 systemd[1]: Started MySQL Community Server.
The full run with bundle/logs can be found at https:/
Running juju resolved on the unit allowed everything to move forward; but this should work without having to resolve a unit or retry hooks.