MySQL Forums
Forum List  »  NDB clusters

Not able to run mutiple memcached instance
Posted by: Manjeet Patel
Date: September 12, 2014 01:43AM

Hi,

We are trying to implementing Sessions using MySQL Cluster + memcached

For this we have setup mysql cluster with one cluster management node + two database Nodes + two application server.

But when I try to connect using memcached only one instance able to connect that.

Below are the config files for each one.

------------------------------------------------------------------------------------------------------------
1. management server
root@mgmd1:/var/lib/mysql-cluster # cat config.ini
[NDBD DEFAULT]

NoOfReplicas=2
DataMemory=80M
IndexMemory=18M
[MYSQLD DEFAULT]

[NDB_MGMD DEFAULT]
DataDir=/var/lib/mysql-cluster
[TCP DEFAULT]

# Section for the cluster management node
[NDB_MGMD]
NodeId=1
# IP address of the first management node (this system)
HostName=192.168.175.35

# Section for the storage nodes
[NDBD]
# IP address of the first storage node
HostName=192.168.172.6
DataDir= /var/lib/mysql-cluster
[NDBD]
# IP address of the second storage node
HostName=192.168.172.26
DataDir=/var/lib/mysql-cluster
# one [MYSQLD] per storage node
[MYSQLD]
[MYSQLD]
------------------------------------------------------------------------------------------------------------
2. Database Nodes Node 1

root@ndbd1:/etc # cat my.cnf
[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.175.35
[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=192.168.175.35
------------------------------------------------------------------------------------------------------------
3. Database Nodes Node 2

root@ndbd1:/etc # cat my.cnf
[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.175.35
[mysql_cluster]
# IP address of the cluster management node
ndb-connectstring=192.168.175.35
------------------------------------------------------------------------------------------------------------

Cluster Configuration >>

root@mgmd1:/var/lib/mysql-cluster # ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.172.6 (mysql-5.6.19 ndb-7.3.6, Nodegroup: 0, *)
id=3 @192.168.172.26 (mysql-5.6.19 ndb-7.3.6, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.175.35 (mysql-5.6.19 ndb-7.3.6)

[mysqld(API)] 2 node(s)
id=4 @192.168.175.26 (mysql-5.6.19 ndb-7.3.6)
id=5 @192.168.175.26 (mysql-5.6.19 ndb-7.3.6)

ndb_mgm>

------------------------------------------------------------------------------------------------------------

Now when I start memcached on application server only one application server able to connect to NDB.

Please see below,

root@applicationserver1:~ # memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=192.168.175.35:1186;role=db-only;" -vv -c 20 -u root
12-Sep-2014 13:04:09 IST NDB Memcache 5.6.19-ndb-7.3.6 started [NDB 7.3.6; MySQL 5.6.19]
Contacting primary management server (192.168.175.35:1186) ...
Connected to "192.168.175.35:1186" as node id 4.
Retrieved 3 key prefixes for server role "db-only".
The default behavior is that:
GET uses NDB only
SET uses NDB only
DELETE uses NDB only.
The 2 explicitly defined key prefixes are "b:" (demo_table_large) and "t:" (demo
Connected to "192.168.175.35" as node id 5.
Server started with 4 threads.
Priming the pump ...
Failed to grow connection pool.
Scheduler: using 1 connection to cluster 0
Scheduler: starting for 1 cluster; c0,f0,g1,t1
done [14.575 sec].
Loaded engine: NDB Memcache 5.6.19-ndb-7.3.6
Supplying the following features: compare and swap, persistent storage, LRU
<48 server listening (auto-negotiate)
<49 server listening (auto-negotiate)
<50 send buffer was 212992, now 268435456
<51 send buffer was 212992, now 268435456
<50 server listening (udp)
<50 server listening (udp)
<51 server listening (udp)
<50 server listening (udp)
<50 server listening (udp)
<51 server listening (udp)
<51 server listening (udp)
<51 server listening (udp)
------------------------------------------------------------------------------------------------------------
root@applicationserver2:~ # memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=192.168.175.35:1186;role=db-only;" -vv -c 20 -u root
12-Sep-2014 13:04:43 IST NDB Memcache 5.6.19-ndb-7.3.6 started [NDB 7.3.6; MySQL 5.6.19]
Contacting primary management server (192.168.175.35:1186) ...
FAILED.
Could not connect to NDB. Shutting down.
Failed to initialize instance. Error code: 255
root@applicationserver2:~ #

Can any one please help, what was the wrong in my configuration.

Options: ReplyQuote


Subject
Views
Written By
Posted
Not able to run mutiple memcached instance
2489
September 12, 2014 01:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.