[root@ndb1 bin]# ./ndbd --initial
unable to connect with connect string: nodeid=0,localhost:1186
retrying every 5 seconds. attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2016-04-03 06:33:35 [ndbd] error -- could not connect to management server, error: ''
mgm节点配置如下:
vi config.ini
[ndbd default]
noofreplicas=2
datamemory=200m
indexmemory=30m
[ndb_mgmd]
nodeid=1
hostname=192.168.137.102
datadir=/var/lib/mysql-cluster/_
[ndbd]
nodeid=2
hostname=192.168.137.101
datadir=/usr/local/mysql/data
[ndbd]
nodeid=3
hostname=192.168.137.103
datadir=/usr/local/mysql/data
[mysqld]
nodeid=4
hostname=192.168.137.104
[mysqld]
nodeid=5
hostname=192.168.137.105
[mysqld]
nodeid=6
mgm启动正常:
[root@mgm bin]# ./ndb_mgm
-- ndb cluster -- management client --
ndb_mgm> show
connected to management server at: localhost:1186
cluster configuration[ndbd(ndb)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.137.101)
id=3 (not connected, accepting connect from 192.168.137.103)
[ndb_mgmd(mgm)] 1 node(s)
id=1 @192.168.137.102 (mysql-5.6.28 ndb-7.4.10)
[mysqld(api)] 3 node(s)
id=4 (not connected, accepting connect from 192.168.137.104)
id=5 (not connected, accepting connect from 192.168.137.105)
id=6 (not connected, accepting connect from any host)
但启动数据节点报错:
[root@ndb1 bin]# ./ndbd --initial
unable to connect with connect string: nodeid=0,localhost:1186
retrying every 5 seconds. attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2016-04-03 06:33:35 [ndbd] error -- could not connect to management server, error: ''
在数据节点connect管理节点没有问题:
[root@ndb1 bin]# ./ndb_mgm
-- ndb cluster -- management client --
ndb_mgm> connect 192.168.137.102
connected to management server at: 192.168.137.102:1186
ndb_mgm> show
cluster configuration[ndbd(ndb)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.137.101)
id=3 (not connected, accepting connect from 192.168.137.103)
[ndb_mgmd(mgm)] 1 node(s)
id=1 @192.168.137.102 (mysql-5.6.28 ndb-7.4.10)
[mysqld(api)] 3 node(s)
id=4 (not connected, accepting connect from 192.168.137.104)
id=5 (not connected, accepting connect from 192.168.137.105)
id=6 (not connected, accepting connect from any host)
