List:Cluster« Previous MessageNext Message »
From:Jon Stephens Date:May 9 2011 6:56am
Subject:Re: MySQL Cluster Installation
View as plain text  
Looks like you're trying to run mysqld processes on hosts that aren't 
configured for them.

 > [mysqld]
 > hostname=10.10.1.4

with no other [mysqld] or [api] sections in the config.ini file means 
"the cluster [data nodes] will accept connections from a mysqld process 
running on host 10.10.1.4 only".

Also, it appears you're trying to create the same database/table more 
than once.

On 09/05/11 08:44, kranthi wrote:
> We have set up the Mysql Cluster and we follow the following steps
>
> one management node and 2 data nodes and one sql node
>
> The my.cnf files in Data node ‘A’, Data node ‘B’,SQL node
> were updated with
> following
>
>
> [mysqld]
> ndbcluster
> ndb-connectstring=10.10.1.1
>
> [mysql_cluster]
> ndb-connectstring=10.10.1.1
>
>
> Management Node config.ini:-
>
>
>
> [ndbd default]
> NoOfReplicas=2
> DataMemory=80M
> IndexMemory=18M
>
> [ndb_mgmd]
> hostname=10.10.1.1
> datadir=/var/lib/mysql-cluster
> [ndbd]
> hostname=10.10.1.2
> datadir=/usr/local/mysql/data
>
> [ndbd]
> hostname=10.10.1.3
> datadir=/usr/local/mysql/data
>
> [mysqld]
> hostname=10.10.1.4
>
> copy the config.ini file in 2 data nodes:-
>
> scp config.ini 10.10.1.2:/var/lib/mysql-cluster/
>
> scp config.ini 10.10.1.3:/var/lib/mysql-cluster/
>
>
> The cluster was started in the following order:-
>
> MGM node : ndb_mgmd -f /var/lib/mysql-cluster/config.ini
>
> Data nodes A and B : ndbd --initial
>
> SQL node: mysqld_safe --user=mysql --ndbcluster --ndb-connectstring=
> 10.10.1.1:1186&
>
> Running show from ndb_mgm client on MGM node we get the following
>
> Cluster Configuration
> ---------------------
> [ndbd(NDB)]     2 node(s)
> id=2    @10.10.1.2  (mysql-5.1.51 ndb-7.1.10, Nodegroup: 0, Master)
> id=3    @10.10.1.3  (mysql-5.1.51 ndb-7.1.10, Nodegroup: 0)
>
> [ndb_mgmd(MGM)] 1 node(s)
> id=1    @10.10.1.1  (mysql-5.1.51 ndb-7.1.10)
>
> [mysqld(API)]   1 node(s)
> id=4    @10.10.1.4  (mysql-5.1.51 ndb-7.1.10)
>
> ndb_mgm>
>
>
> Following checks were done on the SQL node
>
> 1. Show Engines;
>
> mysql>  Show Engines;
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> | Engine     | Support |
> Comment                                                        |
> Transactions | XA   | Savepoints |
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> | ndbcluster | YES     | Clustered, fault-tolerant
> tables                               | YES          | NO   | NO         |
> | MRG_MYISAM | YES     | Collection of identical MyISAM
> tables                          | NO           | NO   | NO         |
> | ndbinfo    | YES     | MySQL Cluster system information storage
> engine                | NO           | NO   | NO         |
> | CSV        | YES     | CSV storage
> engine                                             | NO           | NO   |
> NO         |
> | MEMORY     | YES     | Hash based, stored in memory, useful for temporary
> tables      | NO           | NO   | NO         |
> | FEDERATED  | NO      | Federated MySQL storage
> engine                                 | NULL         | NULL | NULL       |
> | ARCHIVE    | YES     | Archive storage
> engine                                         | NO           | NO   |
> NO         |
> | InnoDB     | YES     | Supports transactions, row-level locking, and
> foreign keys     | YES          | YES  | YES        |
> | MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great
> performance         | NO           | NO   | NO         |
> | BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it
> disappears) | NO           | NO   | NO         |
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> 10 rows in set (0.00 sec)
>
>
> mysql>  show processlist;
>
> +----+-------------+-----------+------+---------+------+-----------------------------------+------------------+
> | Id | User        | Host      | db   | Command | Time |
> State                             | Info             |
>
> +----+-------------+-----------+------+---------+------+-----------------------------------+------------------+
> |  1 | system user |           |      | Daemon  |    0 | Waiting for event
> from ndbcluster | NULL             |
> |  8 | root        | localhost | NULL | Query   |    0 |
> NULL                              | show processlist |
>
> +----+-------------+-----------+------+---------+------+-----------------------------------+------------------+
> 2 rows in set (0.00 sec)
>
>
>
> 2) create database and table ;
>
> mysql>  create database hk;
> Query OK, 1 row affected (0.00 sec)
>
> mysql>  \u hk
> Database changed
> mysql>  create table hh(id int(1)) engine=ndbcluster;
> Query OK, 0 rows affected (0.05 sec)
>
> mysql>
>
>
>
>
>
> Following checks were done on the Data node 1:
>
> mysql>  show engines;
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> | Engine     | Support |
> Comment                                                        |
> Transactions | XA   | Savepoints |
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> | ndbcluster | YES     | Clustered, fault-tolerant
> tables                               | YES          | NO   | NO         |
> | MRG_MYISAM | YES     | Collection of identical MyISAM
> tables                          | NO           | NO   | NO         |
> | ndbinfo    | YES     | MySQL Cluster system information storage
> engine                | NO           | NO   | NO         |
> | CSV        | YES     | CSV storage
> engine                                             | NO           | NO   |
> NO         |
> | MEMORY     | YES     | Hash based, stored in memory, useful for temporary
> tables      | NO           | NO   | NO         |
> | FEDERATED  | NO      | Federated MySQL storage
> engine                                 | NULL         | NULL | NULL       |
> | ARCHIVE    | YES     | Archive storage
> engine                                         | NO           | NO   |
> NO         |
> | InnoDB     | YES     | Supports transactions, row-level locking, and
> foreign keys     | YES          | YES  | YES        |
> | MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great
> performance         | NO           | NO   | NO         |
> | BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it
> disappears) | NO           | NO   | NO         |
>
> +------------+---------+----------------------------------------------------------------+--------------+------+------------+
> 10 rows in set (0.00 sec)
>
>
>
> mysql>  create database hello1;
> Query OK, 1 row affected, 1 warning (0.00 sec)
>
>
> mysql>  show warnings;
>
> +-------+------+---------------------------------------------------------------------------------+
> | Level | Code |
> Message
> |
>
> +-------+------+---------------------------------------------------------------------------------+
> | Error | 1296 | Got error 4009 'Cluster Failure' from NDB. Could not
> acquire global schema lock |
>
> +-------+------+---------------------------------------------------------------------------------+
> 1 row in set (0.00 sec)
>
> mysql>  \u hello1
> Database changed
>
>
>
> mysql>  create table nn(id int(1)) engine=ndbcluster;
> ERROR 1005 (HY000): Can't create table 'hellol.nn' (errno: 157)
> mysql>
>
>
> mysql>  create table hh(id int(1));
> Query OK, 0 rows affected, 2 warnings (0.04 sec)
>
> mysql>  show warnings;
>
> +-------+------+---------------------------------------------------------------------------------+
> | Level | Code |
> Message
> |
>
> +-------+------+---------------------------------------------------------------------------------+
> | Error | 1296 | Got error 4009 'Cluster Failure' from NDB. Could not
> acquire global schema lock |
> | Error | 1296 | Got error 4009 'Cluster Failure' from
> NDB                                       |
>
> +-------+------+---------------------------------------------------------------------------------+
> 2 rows in set (0.00 sec)
>
> mysql>  show processlist;
>
> +----+-------------+-----------+--------+---------+--------+---------------------------------+------------------+
> | Id | User        | Host      | db     | Command | Time   |
> State                           | Info             |
>
> +----+-------------+-----------+--------+---------+--------+---------------------------------+------------------+
> |  1 | system user |           | NULL   | Daemon  | 162545 | Waiting for
> ndbcluster to start | NULL             |
> |  6 | root        | localhost | hello1 | Query   |      0 |
> NULL                            | show processlist |
>
> +----+-------------+-----------+--------+---------+--------+---------------------------------+------------------+
> 2 rows in set (0.00 sec)
>
> mysql>
>
> Please let us know how to overcome this and create the NDB tables
>
> Thanks&  Regards,
> Kranthi
>


-- 

Jon Stephens / MySQL Documentation Team
Oracle Svenska AB / Stockholm
Mobile: +46 (0) 73 677 39 93
Summer: UTC +02.00 / Winter: UTC +01.00
MySQL: www.mysql.com
Oracle: www.oracle.com

Thread
MySQL Cluster Installationkranthi9 May
  • Re: MySQL Cluster InstallationJon Stephens9 May
  • Re: MySQL Cluster InstallationStewart Smith11 May
Re: MySQL Cluster InstallationJon Stephens9 May