Search code examples
mysqlmysql-cluster

Management node not showing all the nodes.


In Management Node configuration file /var/lib/mysql-cluster/config.ini i have specified two data nodes and two SQL nodes. it's showing only one data node and one SQL node.

[ndb_mgmd default]
# Directory for MGM node log files
DataDir=/var/lib/mysql-cluster
[ndb_mgmd]
#Management Node db1
HostName=10.0.2.55
[ndbd default]
NoOfReplicas=2      # Number of replicas
DataMemory=256M     # Memory allocate for data storage
IndexMemory=128M    # Memory allocate for index storage
#Directory for Data Node
DataDir=/var/lib/mysql-cluster
[ndbd]
#Data Node db2
HostName=10.0.2.55
[ndbd]
#Data Node db2
HostName=10.0.2.57
[mysqld]
#SQL Node db3
HostName=10.0.2.55
[mysqld]
#SQL Node db3
HostName=10.0.2.57

Management Node:

ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 10.0.2.55:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     1 node(s)
id=2 (not connected, accepting connect from 10.0.2.55)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.0.2.55  (mysql-5.7.19 ndb-7.5.7)

[mysqld(API)]   1 node(s)
id=3 (not connected, accepting connect from 10.0.2.55)

ndb_mgm> quit

I have disabled the firewall, it's not showing node from any other host.


Solution

  • Restart ndb_mgmd with --reload to ensure new config is in use and before that stop cluster and start up from scratch since you are moving from 1 replica to 2 replicas.