2

i have configured mysql-cluster in centos 7

Management Node

  • db1 = 192.168.5.130

Data Nodes

  • db2 = 192.168.5.131
  • db3 = 192.168.5.132

SQL Nodes

  • db4 = 192.168.5.133
  • db5 = 192.168.5.134

output for management node as follows..

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2    @192.168.5.131  (mysql-5.6.28 ndb-7.4.10, starting, Nodegroup: 0)
id=3    @192.168.5.132  (mysql-5.6.28 ndb-7.4.10, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.5.135  (mysql-5.6.28 ndb-7.4.10)

[mysqld(API)]   2 node(s)
id=4 (not connected, accepting connect from 192.168.5.133)
id=5 (not connected, accepting connect from 192.168.5.134)

data node connected to management node sucessfully.. but sql node is not connected

i have see the some error in ndb_1_cluster.log file.

WARNING  -- Failed to allocate nodeid for API at 192.168.5.134. Returned error: 'No free node id found for mysqld(API).'

How to resolve this issue ? Please guide me to configure mysql-cluster

1

Check your config.ini in /var/lib/mysql-cluster/ it should look something like this, should attach nodeid's if your working with more than 2 Data nodes. and most importantly make sure the data nodes your trying to run has mysql.service running. systemctl mysql.service status

[ndb_mgmd]
# Management process options:
hostname=10.10.12.184           # Hostname of the manager
datadir=/var/lib/mysql-cluster  # Directory for the log files

[ndbd]
hostname=10.10.12.186           # Hostname of the 1st data node
nodeid=1;                       # Node id 1
datadir=/usr/local/mysql/data   # Remote directory for the data files

[ndbd]
hostname=10.10.12.187           # Hostname of the 2nd data node
nodeid=2;                       # Node id 2
datadir=/usr/local/mysql/data   # Remote directory for the data files

[ndbd]
hostname=10.10.12.188           # Hostname of the 3rd data node
nodeid=3;                       # Node id 3
datadir=/usr/local/mysql/data   # Remote directory for the data files

[ndbd]
hostname=10.10.12.189           # Hostname of the 4th data node
nodeid=4;                       # Node id 4
datadir=/usr/local/mysql/data   # Remote directory for the data files

[mysqld]
# SQL node options:
hostname=10.10.12.184  # In our case the MySQL server/client is on the same Droplet as$

In my experience, you should run all the ndbd nodes first then the sqld nodes on by one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.