getting error while starting memecached service with ndb engine
سؤال
i am installed memcached library by following the steps in the internet. now there is a binary file created in bin folder of mysql
now i exicuting the command memcached i am getting error like this
[root@centos1 ~]# /usr/local/mysql/bin/memcached E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=10.10.111.111:1186;role=db_only" -vv -c 20 -u root
24-Feb-2012 15:21:06 IST NDB Memcache 5.5.19-ndb-7.2.4 started [NDB 7.2.4; MySQL 5.5.19] Contacting primary management server (10.10.111.111:1186) ... FAILED. Could not connect to NDB. Shutting down. Segmentation fault
please help me to resolve this problem
المحلول 2
finally i resolved this problem, now memcached service is running properly
actually i got 2 points from that
1)While working with memcached with NoSQL access then there should not be any mysqld process running on that host
2)To start Memcached service we should add 2 extra API nodes for each existing API node and after adding node perform ROLLING RESTART
like i have 3 API nodes in that 2 API node with mysqld process and the other unstarted
[mysqld(API)] 3 node(s) id=4 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=5 (not connected, accepting connect from 10.10.223.174) id=6 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4)
now add 2 node each for each api now status become
[mysqld(API)] 9 node(s) id=4 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=5 (not connected, accepting connect from 10.10.223.174) id=6 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=7 (not connected, accepting connect from any host) id=8 (not connected, accepting connect from any host) id=9 (not connected, accepting connect from any host) id=10 (not connected, accepting connect from any host) id=11 (not connected, accepting connect from any host) id=12 (not connected, accepting connect from any host)
now perform rolling restart now node status become
ndb_mgm> show
Cluster Configuration
[ndbd(NDB)] 2 node(s) id=2 @10.10.221.160 (mysql-5.5.19 ndb-7.2.4, Nodegroup: 0, Master) id=3 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s) id=1 @10.12.200.117 (mysql-5.5.19 ndb-7.2.4)
[mysqld(API)] 9 node(s) id=4 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=5 (not connected, accepting connect from 10.10.223.174) id=6 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=7 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=8 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=9 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=10 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=11 (not connected, accepting connect from any host) id=12 (not connected, accepting connect from any host)
now start the memcached service from 10.10.223.174 node with command /usr/local/mysql/bin/memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=10.12.200.117:1186;role=db-only;debug=true" -vv -u root
now its started without any error
now status of all the nodes
ndb_mgm> show
Cluster Configuration
[ndbd(NDB)] 2 node(s) id=2 @10.10.221.160 (mysql-5.5.19 ndb-7.2.4, Nodegroup: 0, Master) id=3 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s) id=1 @10.12.200.117 (mysql-5.5.19 ndb-7.2.4)
[mysqld(API)] 9 node(s) id=4 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=5 @10.10.223.174 (mysql-5.5.19 ndb-7.2.4) id=6 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=7 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=8 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=9 @10.10.221.157 (mysql-5.5.19 ndb-7.2.4) id=10 @10.10.221.254 (mysql-5.5.19 ndb-7.2.4) id=11 @10.10.223.174 (mysql-5.5.19 ndb-7.2.4) id=12 @10.10.223.174 (mysql-5.5.19 ndb-7.2.4)
now i can tryout the example from link http://www.clusterdb.com/mysql-cluster/scalabale-persistent-ha-nosql-memcache-storage-using-mysql-cluster/
NOW ITS WORKING FINE
thanks with regards Deepak M
نصائح أخرى
Make sure that you have at least 2 unused API slots ([mysqld] sections) in your configi.ini file (and perform a rolling restart of your Cluster after adding them). These slots will then be used by memcached.
Note that you can choose to run mysqld processes on the host as well and have them part of the cluster (can access the same data through SQL and NoSQL) - you just need to make sure that you include enough [mysqld] sections in your config.ini file so that there are a couple left for memcached.
for the previous ERROR found the solution ,but now getting new ERROR
because its NoSQL access to there should not be any mysqld process running on that node, i stopped the mysqld process and executed the same command
like
memcached -E /usr/local/mysql/lib/ndb_engine.so -e "connectstring=10.12.200.117:1186;role=db-only;debug=true" -vv -c 20 -u root
main --> ndb_initialize()
main print_debug_startup_info(): sizeof Ndb : 144
main print_debug_startup_info(): sizeof NdbInstance : 64
main print_debug_startup_info(): sizeof workitem : 136
main print_debug_startup_info(): sizeof ExternalValue : 96
main --> connect_to_primary_cluster()
22-Mar-2012 15:48:39 IST NDB Memcache 5.5.19-ndb-7.2.4 started [NDB 7.2.4; MySQL 5.5.19]
Contacting primary management server (10.12.200.117:1186) ...
main --> ClusterConnectionPool::connect()
Connected to "10.12.200.117:1186" as node id 6.
main --> Configuration::fetch_meta_record()
main get_supported_version(): 1.2
main --> config_v1::read_configuration()
main get_server_role_id(): Name: "db-only" -- ID: 1
main --> config_v1::get_policies()
main get_policies(): ndb-only: get-2 set-2 del-2 flush-1 addr-0x8861898
main get_policies(): caching: get-3 set-3 del-3 flush-1 addr-0x88652c0
main get_policies(): memcache-only: get-1 set-1 del-1 flush-1 addr-0x88aa9e8
main get_policies(): ndb-test: get-2 set-2 del-2 flush-2 addr-0x88aaa20
main get_policies(): caching-with-local-deletes: get-3 set-3 del-1 flush-1 addr-0x8866b08
main get_policies(): ndb-read-only: get-2 set-4 del-4 flush-1 addr-0x8867c60
main --> config_v1::get_connections()
main --> store_connection_pool_for_cluster()
main get_connections(): [0]: { 0 => "10.12.200.117" [rtt: 250]}
main get_connections(): clusters: 1
main --> config_v1::get_prefixes()
main QueryPlan(): Using Index: PRIMARY on Table: key_prefixes [SCAN]
main get_container_record(): "demo_table" found in database (demo_table).
main get_container_record(): "demo_ext" found in database (demo_table_large).
main get_container_record(): "demo_tabs" found in database (demo_table_tabs).
main --> config_v1::log_signon()
main set_initial_cas(): Sign On GCI: 0xbb450000000b | Node Id: [6] 0x60000000 | Engine bit: 0x1000000000
main set_initial_cas(): Initial CAS: 6589031198490624 0x1768b060000000
main --> config_v1 destructor()
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_table_tabs)
main --> Configuration::openAllConnections()
main --> ClusterConnectionPool::connect()
**open_connections_to_all_clusters() failed**
main --> ndb_destroy()
Segmentation fault
Can any one help me out in finding solution on this
thanks in adv Deepak M