1

I am a brand new user to the MySQL cluster world (literally hours). I was following a tutorial just to get a simple cluster set up (one management node on one machine, a second machine with a SQL node and a data node). I seem to have a functioning management node and I believe I have a functioning SQL node, but my data node acts like it's connecting, but the management node says it isn't connected.

Management Node Config:

[ndbd default]
NoOfReplicas= 1
MaxNoOfConcurrentOperations= 10000
DataMemory= 3072M
IndexMemory= 256M
TimeBetweenWatchDogCheck= 30000
DataDir= /var/lib/mysql-cluster
MaxNoOfOrderedIndexes= 512

[ndb_mgmd default]
DataDir= /var/lib/mysql-cluster

[ndb_mgmd]
NodeId=1
HostName= 192.168.0.5

[ndbd]
NodeId= 2
HostName= 192.168.0.6

[mysqld]
NodeId= 4
HostName = 192.168.0.6

# choose an unused port number
# in this configuration 63132, 63133, and 63134
# will be used
[tcp default]
PortNumber= 63132

SQL Node Config:

[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.0.5
[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=192.168.0.5

Data Node Config:

[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.0.5

[MYSQL_CLUSTER]
ndb-connectstring=192.168.0.5

When I run sudo /usr/local/mysql/bin/ndbd I get:

2012-04-22 22:56:44 [ndbd] INFO     -- Angel connected to '192.168.0.5:1186'
2012-04-22 22:56:44 [ndbd] INFO     -- Angel allocated nodeid: 2

But when I check its status on the management node, I get:

Node 2: not connected

I'm sure as a total noob I'm just missing something, but I would really appreciate if someone could point me in the right direction.

2 Answers 2

1

That is weird. Two things I would check that can cause problems (in my experience):

1> make sure iptables is not running

2> make sure selinux is disabled (or permissive)

...at least in the beginning.

You can also try watching the network to see if things are going as suggested although I've never done this for mysql cluster specifically:

tcpdump -s0 -A -i any port 63132

Finally,

I noticed you forced a port number in the ndb mgmt config but not in the node configs. Is that going to be required info on the nodes? Try commenting that out in the mgmt node.

1

I agree that it's worth turning off the firewall temporarily to see if that fixes the issue.

If it doesn't, a couple of other things you could try... - running with a single replica is very unusual, try setting it to 2 and starting a second ndbd process - try including the connect-string on the command-line when starting the ndbd(s)

I've never had to alter selinux to get Cluster to work.

Something else you could do is try running all of the processes on a single host - this is stepped through in the MySQL Cluster quick-start guides. For multiple hosts see this blog post on running MySQL Cluster over multiple Linux hosts.

1
  • I'm only running one ndbd server right now because I am waiting on hardware that I am going to run the second ndbd process on, but I am experimenting with other suggestions.
    – Nik
    Commented Apr 23, 2012 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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