My First Cluster - Getting error on Nodegroup configuration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

My First Cluster - Getting error on Nodegroup configuration

Roger Joys (Register)
Hello list. I am new to this list and new to MySQL Cluster.

I have been having an issue with setting up a small sample cluster on both CentOS 6.6 and 7.1. Both OS’s give me the same error.

Essentially, I am copying the steps outlined on the MySQL Cluster installation page. When I try to bring up the manager, I get the following error:


sudo ndb_mgmd -f /var/lib/mysql-cluster/config.ini --initial --config-dir=/var/lib/mysql-cluster/ creates=/var/lib/mysql-cluster/ndb_1_cluster.log



MySQL Cluster Management Server mysql-5.6.22 ndb-7.3.8
2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- at line 39: Nodegroup 1 has 1 members, NoOfReplicas=2
2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- Could not load configuration from '/var/lib/mysql-cluster/config.ini'


My /var/lib/mysql-cluster/config.ini looks like this:

      1 [ndbd default]
      2 # Options affecting ndbd processes on all data nodes:
      3 NoOfReplicas=2    # Number of replicas
      4 DataMemory=80M    # How much memory to allocate for data storage
      5 IndexMemory=18M   # How much memory to allocate for index storage
      6                   # For DataMemory and IndexMemory, we have used the
      7                   # default values. Since the "world" database takes up
      8                   # only about 500KB, this should be more than enough for
      9                   # this example Cluster setup.
     10
     11
     12 [ndb_mgmd]
     13 # Management process options:
     14 hostname=172.28.128.13
     15 # Directory for MGM node log files        
     16 datadir=/var/lib/mysql-cluster  
     17
     18
     19
     20 ## SQL Data
     21 [ndbd]
     22 hostname=172.28.128.15
     23 datadir=/usr/local/mysql/data
     24
     25 [ndbd]
     26 hostname=172.28.128.16
     27 datadir=/usr/local/mysql/data
     28
     29 [ndbd]
     30 hostname=172.28.128.17
     31 datadir=/usr/local/mysql/data
     32
     33
     34 ## SQL Nodes
     35 [mysqld]
     36 hostname=172.28.128.14
     37
     38
     39

each Data and SQL Node has a my.cnf of:

      1 [mysqld]
      2 ndbcluster                      # run NDB storage engine
      3 ndb-connectstring=172.28.128.13
      4 [mysql_cluster]
      5 # Options for MySQL Cluster processes:
      6 ndb-connectstring=172.28.128.13


If I change the config.ini to NoOfReplicas to 1, the management node initializes and comes up, and when I bring the data nodes up, I see each one is in it’s own node group (as may be expected based on the error message)

Cluster Configuration
---------------------
[ndbd(NDB)] 3 node(s)
id=2 @172.28.128.15  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 0, *)
id=3 @172.28.128.16  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 1)
id=4 @172.28.128.17  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 2)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @172.28.128.13  (mysql-5.6.22 ndb-7.3.8)

[mysqld(API)] 1 node(s)
id=5 (not connected, accepting connect from 172.28.128.14)

I have not brought the SQL Node online yet

I found it interesting that the line number referenced in the error is also the last line of the file.

My question is what configuration or installation miss would cause this? I’ve repeated this over an over, and like I mentioned, I also tried it on 2 different flavors of CentOS, with different respective RPM bundles for the different versions of the OS.

Thank you in advance for any insights.

-r



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: My First Cluster - Getting error on Nodegroup configuration

Roger Joys (Register)
I was able to determine the issue. Apparently (and I am still not 100% sure where this is documented), the number of data nodes must be evenly divisible by the NoOfReplicas. When I changed things to 2 data nodes, all is well. When I bumped the number of data nodes to 4 it also worked, but that starts to max out my laptop with  6 VM’s running on it.

Perhaps the algorithm is mode complex than what I am describing.

-r



> On Jan 27, 2015, at 3:43 PM, Roger Joys (Register) <[hidden email]> wrote:
>
> Hello list. I am new to this list and new to MySQL Cluster.
>
> I have been having an issue with setting up a small sample cluster on both CentOS 6.6 and 7.1. Both OS’s give me the same error.
>
> Essentially, I am copying the steps outlined on the MySQL Cluster installation page. When I try to bring up the manager, I get the following error:
>
>
> sudo ndb_mgmd -f /var/lib/mysql-cluster/config.ini --initial --config-dir=/var/lib/mysql-cluster/ creates=/var/lib/mysql-cluster/ndb_1_cluster.log
>
>
>
> MySQL Cluster Management Server mysql-5.6.22 ndb-7.3.8
> 2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- at line 39: Nodegroup 1 has 1 members, NoOfReplicas=2
> 2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- Could not load configuration from '/var/lib/mysql-cluster/config.ini'
>
>
> My /var/lib/mysql-cluster/config.ini looks like this:
>
>       1 [ndbd default]
>       2 # Options affecting ndbd processes on all data nodes:
>       3 NoOfReplicas=2    # Number of replicas
>       4 DataMemory=80M    # How much memory to allocate for data storage
>       5 IndexMemory=18M   # How much memory to allocate for index storage
>       6                   # For DataMemory and IndexMemory, we have used the
>       7                   # default values. Since the "world" database takes up
>       8                   # only about 500KB, this should be more than enough for
>       9                   # this example Cluster setup.
>      10
>      11
>      12 [ndb_mgmd]
>      13 # Management process options:
>      14 hostname=172.28.128.13
>      15 # Directory for MGM node log files        
>      16 datadir=/var/lib/mysql-cluster  
>      17
>      18
>      19
>      20 ## SQL Data
>      21 [ndbd]
>      22 hostname=172.28.128.15
>      23 datadir=/usr/local/mysql/data
>      24
>      25 [ndbd]
>      26 hostname=172.28.128.16
>      27 datadir=/usr/local/mysql/data
>      28
>      29 [ndbd]
>      30 hostname=172.28.128.17
>      31 datadir=/usr/local/mysql/data
>      32
>      33
>      34 ## SQL Nodes
>      35 [mysqld]
>      36 hostname=172.28.128.14
>      37
>      38
>      39
>
> each Data and SQL Node has a my.cnf of:
>
>       1 [mysqld]
>       2 ndbcluster                      # run NDB storage engine
>       3 ndb-connectstring=172.28.128.13
>       4 [mysql_cluster]
>       5 # Options for MySQL Cluster processes:
>       6 ndb-connectstring=172.28.128.13
>
>
> If I change the config.ini to NoOfReplicas to 1, the management node initializes and comes up, and when I bring the data nodes up, I see each one is in it’s own node group (as may be expected based on the error message)
>
> Cluster Configuration
> ---------------------
> [ndbd(NDB)] 3 node(s)
> id=2 @172.28.128.15  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 0, *)
> id=3 @172.28.128.16  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 1)
> id=4 @172.28.128.17  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 2)
>
> [ndb_mgmd(MGM)] 1 node(s)
> id=1 @172.28.128.13  (mysql-5.6.22 ndb-7.3.8)
>
> [mysqld(API)] 1 node(s)
> id=5 (not connected, accepting connect from 172.28.128.14)
>
> I have not brought the SQL Node online yet
>
> I found it interesting that the line number referenced in the error is also the last line of the file.
>
> My question is what configuration or installation miss would cause this? I’ve repeated this over an over, and like I mentioned, I also tried it on 2 different flavors of CentOS, with different respective RPM bundles for the different versions of the OS.
>
> Thank you in advance for any insights.
>
> -r
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: My First Cluster - Getting error on Nodegroup configuration

Stewart Smith-2
"Roger Joys (Register)" <[hidden email]> writes:
> I was able to determine the issue. Apparently (and I am still not 100%
> sure where this is documented), the number of data nodes must be
> evenly divisible by the NoOfReplicas. When I changed things to 2 data
> nodes, all is well. When I bumped the number of data nodes to 4 it
> also worked, but that starts to max out my laptop with  6 VM’s running
> on it.

You can run all the nodes in one VM, you don't need one VM per node, you
just need unique filesystem paths to do it.

I have (for 10+ years now, wow) run multiple data nodes on a single
machine without VMs.

> Perhaps the algorithm is mode complex than what I am describing.

I think we got this relatively well documented way back in the
day...

--
Stewart Smith

signature.asc (834 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: My First Cluster - Getting error on Nodegroup configuration

Mukhson
In reply to this post by Roger Joys (Register)
Hi Roger,

Im let me try to answer your case here (I'm not good in english :D) :

> Hello list. I am new to this list and new to MySQL Cluster.
>
> I have been having an issue with setting up a small sample cluster on both CentOS 6.6 and 7.1. Both OS’s give me the same error.
>
> Essentially, I am copying the steps outlined on the MySQL Cluster installation page. When I try to bring up the manager, I get the following error:
>
>
> sudo ndb_mgmd -f /var/lib/mysql-cluster/config.ini --initial --config-dir=/var/lib/mysql-cluster/ creates=/var/lib/mysql-cluster/ndb_1_cluster.log
>
>
>
> MySQL Cluster Management Server mysql-5.6.22 ndb-7.3.8
> 2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- at line 39: Nodegroup 1 has 1 members, NoOfReplicas=2
> 2015-01-27 15:30:20 [MgmtSrvr] ERROR    -- Could not load configuration from '/var/lib/mysql-cluster/config.ini'
>
>
> My /var/lib/mysql-cluster/config.ini looks like this:
>
>        1 [ndbd default]
>        2 # Options affecting ndbd processes on all data nodes:
>        3 NoOfReplicas=2    # Number of replicas
>        4 DataMemory=80M    # How much memory to allocate for data storage
>        5 IndexMemory=18M   # How much memory to allocate for index storage
>        6                   # For DataMemory and IndexMemory, we have used the
>        7                   # default values. Since the "world" database takes up
>        8                   # only about 500KB, this should be more than enough for
>        9                   # this example Cluster setup.
>       10
>       11
>       12 [ndb_mgmd]
>       13 # Management process options:
>       14 hostname=172.28.128.13
>       15 # Directory for MGM node log files
>       16 datadir=/var/lib/mysql-cluster
>       17
>       18
>       19
>       20 ## SQL Data
>       21 [ndbd]
>       22 hostname=172.28.128.15
>       23 datadir=/usr/local/mysql/data
>       24
>       25 [ndbd]
>       26 hostname=172.28.128.16
>       27 datadir=/usr/local/mysql/data
>       28
>       29 [ndbd]
>       30 hostname=172.28.128.17
>       31 datadir=/usr/local/mysql/data
It seems that you use 3 data nodes here. So that you define
NoofReplicas=2. NoofReplicas is used to determine the node group. We
have this formula:

[number_of_node_groups] = number_of_data_nodes / NoOfReplicas

According to that formula, cluster will failed to determine the node group which is node group will be node_group=3/2. This node group is where the data node is replicating the
data on each other group.

So if we have 4 data nodes (a,b,c,d) and NoofReplicas=2 then it will be: node_group=4/2. That makes 2 node group each group has 2 data nodes

node_group1=a,b
node_group2=c,d

on group 1 the data will be partitioned on those 2 data nodes a and b and vise versa.

reference: http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-nodes-groups.html


>       32
>       33
>       34 ## SQL Nodes
>       35 [mysqld]
>       36 hostname=172.28.128.14
>       37
>       38
>       39
>
> each Data and SQL Node has a my.cnf of:
>
>        1 [mysqld]
>        2 ndbcluster                      # run NDB storage engine
>        3 ndb-connectstring=172.28.128.13
>        4 [mysql_cluster]
>        5 # Options for MySQL Cluster processes:
>        6 ndb-connectstring=172.28.128.13
>
>
> If I change the config.ini to NoOfReplicas to 1, the management node initializes and comes up, and when I bring the data nodes up, I see each one is in it’s own node group (as may be expected based on the error message)
>
> Cluster Configuration
> ---------------------
> [ndbd(NDB)] 3 node(s)
> id=2 @172.28.128.15  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 0, *)
> id=3 @172.28.128.16  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 1)
> id=4 @172.28.128.17  (mysql-5.6.22 ndb-7.3.8, Nodegroup: 2)
>
> [ndb_mgmd(MGM)] 1 node(s)
> id=1 @172.28.128.13  (mysql-5.6.22 ndb-7.3.8)
>
> [mysqld(API)] 1 node(s)
> id=5 (not connected, accepting connect from 172.28.128.14)
>
> I have not brought the SQL Node online yet
>
> I found it interesting that the line number referenced in the error is also the last line of the file.
>
> My question is what configuration or installation miss would cause this? I’ve repeated this over an over, and like I mentioned, I also tried it on 2 different flavors of CentOS, with different respective RPM bundles for the different versions of the OS.
>
> Thank you in advance for any insights.
>
> -r
>
>
>
Regards,

Mukhson

--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: My First Cluster - Getting error on Nodegroup configuration

Roger Joys (Register)
Thank you for the response.

The algorithm is very straight forward, and I see where my config went awry.

I built this config as a set Ansible Playbook to build the cluster. I am testing locally with Vagrant then when it’s good, will deploy the same playbook configuration on AWS. I’ll want to ensure the node counts have some test to ensure the next person using them doesn’t set configs that create the same issue.

-r




--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster

Loading...