Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

migrated from superuser.com Apr 23 '12 at 7:31

This question came from our site for computer enthusiasts and power users.

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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 Apr 23 '12 at 23:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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