4

In a MySQL cluster I have three hosts, one with a manager node, and the other two are each both a data node and sql node. Connecting to the manager is possible, however only as [ndbd] and not [mysqld]... Meaning they connect to the manager as data nodes but not as sql nodes. Everything looks as it should other than the "not connected" part, and I receive no error messages. So my question is why is the manager node recognizing each machine as only a data node and not as mysql node as well?

Below you can see the ndb_mgm cluster configuration followed by the contents of config.ini:


 Cluster Configuration
 ---------------------
 [ndbd(NDB)] 2 node(s)
 id=2 @10.0.40.105 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0, Master)
 id=3 @10.0.40.100 (mysql-5.5.25 ndb-7.2.7, Nodegroup: 0)
 [ndb_mgmd(MGM)] 1 node(s)
 id=1 @10.0.40.119 (mysql-5.5.25 ndb-7.2.7)
 [mysqld(API)] 2 node(s)
 id=4 (not connected, accepting connect from any host)
 id=5 (not connected, accepting connect from any host)


config.ini:

 [ndbd default]
 # Options affecting ndbd processes on all data nodes:
 NoOfReplicas=2 # Number of replicas
 [tcp default]
 # TCP/IP options:
 [ndb_mgmd]
 # Management process options:
 hostname=10.0.40.119 # Hostname or IP address of MGM node
 datadir=/var/lib/mysql-cluster # Directory for MGM node log files
 NodeId=1
 [ndbd]
 # Options for data node-1:
 # (one [ndbd] section per data node)
 hostname=10.0.40.105 # Hostname or IP address
 datadir=/usr/local/mysql/data # Directory for this data node's data files
 NodeId=2
 [ndbd]
 # Options for data node-2:
 hostname=10.0.40.100 # Hostname or IP address
 datadir=/usr/local/mysql/data # Directory for this data node's data files
 NodeId=3
 #one [mysqld] per storage node
 [mysqld]
 [mysqld]


/etc/my.cnf:

 [mysqld]
 ndbcluster
 ndb-connectstring=10.0.40.119
 [mysql_cluster]
 ndb-connectstring=10.0.40.119


ps -ef | grep mysqld | grep -v grep

Output of: ps -ef | grep mysqld | grep -v grep

asked Aug 6, 2012 at 18:05
1
  • I have tried variations to this install. All nodes on separate hosts, mysql/data on same host, mysql/data/manager... Always the problem is connecting the SQL node. Commented Aug 7, 2012 at 19:33

2 Answers 2

4

So the solution was the conflicting myslqd. Apparently mysql has a mysqld and mysql cluster has a mysqld and they were conflicting or I was running the wrong one. In the end I uninstalled mysql and reinstalled mysql cluster and it worked perfectly. Big thanks to RolandoMySQLDBA for helping me troubleshoot this issue.

answered Aug 14, 2012 at 15:04
0

/* This query will return number of not running nodes , returns 0 incase of all nodes are running*/

SELECT 
 @total := 
 (SELECT 
 VARIABLE_VALUE 
 FROM
 information_schema.`GLOBAL_STATUS` 
 WHERE VARIABLE_NAME = 'NDB_NUMBER_OF_DATA_NODES') AS `Total`,
 @running := 
 (SELECT 
 VARIABLE_VALUE 
 FROM
 information_schema.`GLOBAL_STATUS` 
 WHERE VARIABLE_NAME = 'NDB_NUMBER_OF_READY_DATA_NODES') AS `Running`,
 @total - @running AS `Nodes_Not_Running` ;

What does this query returns?

Only %Ndb_number_of_ready_data_nodes% out of %Ndb_number_of_data_nodes% data nodes are running. View which data nodes are unavailable by running ndb_mgm -e show

answered Aug 7, 2012 at 5:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.