MySQL Cluster Manager (MCM) API Hangs When Connection to Management Node is Lost
(Doc ID 1921390.1)
Last updated on AUGUST 16, 2016
Applies to:MySQL Cluster - Version 7.1 and later
Information in this document applies to any platform.
Have a thread for each Management node (MGM) of the cluster (two Management nodes), in this thread:
- Connect to MGM
- Setting a timeout of 5 sec
ndb_mgm_connect(h, 1, 0, 0)
If connected, then subscribe MGM events:
In a while loop listening to MGM events, in case of "Connection, shutdown,nodrestart, startup event" fetch the Cluster state:
if (rc > 0)
Connection, shutdown,nodrestart, startup event=>ndb_mgm_get_status(h);
else if (rc < 0) //error
monitoring = false;
In case of error returned by ndb_logevent_get_next, trying to reconnect to mgm nodes, and start all over again.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!