List:Cluster« Previous MessageNext Message »
From:Manoj Burande Date:September 7 2009 12:27pm
Subject:Re: Unable to configuring multiple Management nodes.
View as plain text  
Hello Geert,

I need your help to configure MySQL-Clustering server in following manner.

I have two hosts as,
1] 192.168.1.107
2] 192.168.1.125

Each hosts have node entries as,

On host: 192.168.1.107:
=======================
1] MGMT Node
2] DATA Node
3] MYSQL[API] Node

On host: 192.168.1.125:
=======================
1] MGMT Node
2] DATA Node
3] MYSQL[API] Node

Both the servers are placed behind "load balancer" to manage incoming
connections. So the incoming connections or requests to the server will be
managed(distribute) by load balancer to control traffic on the server.

The load balancer is already configured in such a way, like if one server
goes down or dead(due to the system crash) then load balancer will
responsible to forward all incoming request or all request or connections 
 should be respond by live one(Server).


My current configuration files are as follows:
----------------------------------------------

"my.cnf" On host: 192.168.1.107:
================================
# The MySQL server
[mysql_cluster]
ndb-connectstring=192.168.1.107:1186

[ndbd]
connect-string=192.168.1.107:1186,192.168.1.125:1186

[ndb_mgm]
connect-string=192.168.1.107:1186

[ndb_mgmd]
config-file=/var/lib/mysql-cluster/config.ini

[mysqld]
ndbcluster
ndb-connectstring=192.168.1.107


"my.cnf" On host: 192.168.1.125:
================================
# The MySQL server
[mysql_cluster]
ndb-connectstring=192.168.1.125:1186

[ndbd]
connect-string=192.168.1.125:1186,192.168.1.107:1186

[ndb_mgm]
connect-string=192.168.1.125:1186

[ndb_mgmd]
config-file=/var/lib/mysql-cluster/config.ini

[mysqld]
ndbcluster
ndb-connectstring=192.168.1.125

AND

"config.ini" On host: 192.168.1.107:
====================================

[NDBD DEFAULT]
NoOfReplicas=2    # Number of replicas
DataMemory=3500M    # How much memory to allocate for data storage
IndexMemory=1000M   # How much memory to allocate for index storage
datadir=/usr/local/mysql/data   # Directory for this data node's datafiles
#MaxNoOfConcurrentOperations=1048576
#MaxNoOfConcurrentTransactions= 1048576
#MaxNoOfLocalOperations=1048576
#MaxNoOfConcurrentIndexOperations=16384
#MaxNoOfConcurrentScans=500
#LockPagesInMainMemory=Y
# TCP/IP options:
[TCP DEFAULT]
portnumber=2202   # This the default; however, you can use any

# Management process options:
[NDB_MGMD DEFAULT]
datadir=/var/lib/mysql-cluster  # Directory for MGM node logfiles

[NDB_MGMD]
hostname=192.168.1.107           # Hostname or IP address of MGM node

# Options for data node "A":
[NDBD]
id=3                             # (one [NDBD] section per data node)
hostname=192.168.1.107           # Hostname or IP address

# Options for data node "B":
[NDBD]
id=4
hostname=192.168.1.125          # Hostname or IP address

# SQL node options:
[MYSQLD]
id=5
hostname=192.168.1.107



"config.ini" On host: 192.168.1.125:
====================================
[NDBD DEFAULT]
NoOfReplicas=2    # Number of replicas
DataMemory=3500M    # How much memory to allocate for data storage
IndexMemory=1000M   # How much memory to allocate for index storage
datadir=/usr/local/mysql/data   # Directory for this data node's datafiles
#MaxNoOfConcurrentOperations=1048576
#MaxNoOfConcurrentTransactions= 1048576
#MaxNoOfLocalOperations=1048576
#MaxNoOfConcurrentIndexOperations=16384
#MaxNoOfConcurrentScans=500
#LockPagesInMainMemory=Y
# TCP/IP options:
[TCP DEFAULT]
portnumber=2202   # This the default; however, you can use any

# Management process options:
[NDB_MGMD DEFAULT]
datadir=/var/lib/mysql-cluster  # Directory for MGM node logfiles

[NDB_MGMD]
hostname=192.168.1.125           # Hostname or IP address of MGM node

# Options for data node "A":
[NDBD]
id=3                             # (one [NDBD] section per data node)
hostname=192.168.1.107           # Hostname or IP address

# Options for data node "B":
[NDBD]
id=4
hostname=192.168.1.125          # Hostname or IP address

# SQL node options:
[MYSQLD]
id=5
hostname=192.168.1.125


With respect to the above configuration I am trying to configure the
servers as,

To create the replication between two data nodes. Means if one server goes
down or crashes then automatically the same data should be served by
another one live server.

In short, the nodes 'A' and 'B' should have data replication in between
them and same data should be server if one will goes down. All incoming
request or connection are managed by the load balancer.

I have tried to implement the same with above configuration using
following steps on both server but there are some problems as,

On host 192.168.1.107
=====================
1] [root@ns mysql-cluster]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
2009-09-07 17:48:24 [MgmSrvr] INFO     -- NDB Cluster Management Server.
mysql-5.1.34 ndb-7.0.6
2009-09-07 17:48:24 [MgmSrvr] INFO     -- Loaded config from
'//mysql-cluster/ndb_1_config.bin.1'

2] [root@ns mysql-cluster]# /usr/local/mysql/bin/ndbd
2009-09-07 17:49:36 [ndbd] INFO     -- Configuration fetched from
'192.168.1.107:1186', generation: 1

3] [root@ns mysql-cluster]# mysqld_safe --ndbcluster
--ndb-connectstring=192.168.1.107 &
[1] 12189
[root@ns mysql-cluster]# 090907 17:50:17 mysqld_safe Logging to
'/var/lib/mysql/ns.err'.
090907 17:50:17 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql

OUT PUT OF (ndb_mgm -e show):
=============================
[root@ns mysql-cluster]# ndb_mgm -e show
Connected to Management Server at: 192.168.1.107:1186
Cluster Configuration
---------------------
[ndbd(NDB)]	2 node(s)
id=3	@192.168.1.107  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)
id=4 (not connected, accepting connect from 192.168.1.125)

[ndb_mgmd(MGM)]	1 node(s)
id=1	@192.168.1.107  (mysql-5.1.34 ndb-7.0.6)

[mysqld(API)]	1 node(s)
id=5	@192.168.1.107  (mysql-5.1.34 ndb-7.0.6)



After that the same steps carried out,
On on host 192.168.1.125:
=========================

1] [root@test mysql-cluster]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
2009-09-07 17:55:24 [MgmSrvr] INFO     -- NDB Cluster Management Server.
mysql-5.1.34 ndb-7.0.6
2009-09-07 17:55:24 [MgmSrvr] INFO     -- Loaded config from
'//mysql-cluster/ndb_1_config.bin.1'

2] [root@test mysql-cluster]# /usr/local/mysql/bin/ndbd
2009-09-07 17:55:59 [ndbd] INFO     -- Configuration fetched from
'192.168.1.125:1186', generation: 1

3] [root@test mysql-cluster]# mysqld_safe --ndbcluster
--ndb-connectstring=192.168.1.125 &
[2] 5276
[root@test mysql-cluster]# 090907 17:56:30 mysqld_safe Logging to
'/var/lib/mysql/test.testmachine.com.err'.
090907 17:56:30 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql


OUT PUT OF (ndb_mgm -e show):
=============================

[root@test mysql-cluster]# ndb_mgm -e show
Connected to Management Server at: 192.168.1.125:1186
Cluster Configuration
---------------------
[ndbd(NDB)]	2 node(s)
id=3 (not connected, accepting connect from 192.168.1.107)
id=4	@192.168.1.125  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)

[ndb_mgmd(MGM)]	1 node(s)
id=1	@192.168.1.125  (mysql-5.1.34 ndb-7.0.6)

[mysqld(API)]	1 node(s)
id=5	@192.168.1.107  (mysql-5.1.34 ndb-7.0.6)


The above resulted out put shows that the both data nodes from each server
are not able to communicate with each other. So please tell me the proper
configuration or the proper steps to implement my scenario perfectly.

Awaiting for your reply.




> Manoj,
>
> And my blog post was not useful then?
> Did that simple setup also fail for you? I would be interested to hear
> it so I can fix things..
>
> -Geert
>
> On Sep 1, 2009, at 06:25, Manoj Burande wrote:
>
>> Hello johan,
>>
>> I did everything as per the required procedures but still facing same
>> problem.
>>
>> I have few doubts regarding the same which I want to clear as,
>>
>> 1] Is the file permissions or ownership matters in this problem.
>> 2] Is the "my.cnf" file matters while starting "ndb_mgmd".
>> 3] If the "my.cnf" file matters then please provide me the sample
>> my.cnf
>> configuration file.
>> 4] Is there any concept of master and slave management node while
>> configuring it.
>> 5] Is it require any network configuration.
>>
>> OR
>>
>> Can you pleaseeeee provide me the both (my.cnf and config.ini) files
>> as
>> per previously provided scenario.
>>
>> Pleaseeeeeeee help me.
>>
>>
>>
>>> Hi,
>>>
>>> I have spotted some bugs in the management servers. Here is one
>>> regarding multiple management servers:
>>>
>>> http://bugs.mysql.com/bug.php?id=45495
>>>
>>> -johan
>>>
>>> Geert Vanderkelen wrote:
>>>> Manoj, All,
>>>>
>>>> And I wrote something, I hope this helps:
>>>>
> http://blog.some-abstract-type.com/2009/08/how-to-start-mysql-cluster-70-with-2.html
>>>>
>>>>
>>>> -Geert
>
> --
> Geert Vanderkelen, MySQL Senior Support Engineer
> Sun Microsystems GmbH     Sonnenallee 1, D-85551 Kirchheim-Heimstetten
>
> Geschaeftsfuehrer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
> Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028
>
>


-- 
Manoj M. Burande,
Artificial Machines Pvt Ltd,
System Administrator.


Thread
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
  • Re: Unable to configuring multiple Management nodes.Manoj Burande31 Aug
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
  • Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
    • Re: Unable to configuring multiple Management nodes.Johan Andersson31 Aug
      • Re: Unable to configuring multiple Management nodes.Manoj Burande1 Sep
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen1 Sep
  • Re: Unable to configuring multiple Management nodes.Hendrik Woltersdorf1 Sep
  • Re: Unable to configuring multiple Management nodes.Manoj Burande7 Sep
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen7 Sep
  • Re: Unable to configuring multiple Management nodes.Manoj Burande10 Sep