LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1484|回复: 0

mysql-cluster的问题棘手

[复制链接]
发表于 2009-12-1 16:04:11 | 显示全部楼层 |阅读模式
我搭建了一个3台服务器所做的mysql-cluster集群
集群版本是7.09G 操作系统是RH-5.2-32
使用的是RPM包安装方式
服务器为 MySQL-Cluster-gpl-server和MySQL-Cluster-gpl-client和MySQL-Cluster-gpl-storage
MGM为MySQL-Cluster-gpl-manm..和MySQL-Cluster-gpl-tools
为了速度搭建config.ini和my.cnf都是为简易的书写
MGM的输出状态为
ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.187.138  (mysql-5.1.39 ndb-7.0.9, starting, Nodegroup: 0)
id=3    @192.168.187.139  (mysql-5.1.39 ndb-7.0.9, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.187.140  (mysql-5.1.39 ndb-7.0.9)

[mysqld(API)]   3 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)

服务和端口都没有问题
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         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | 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         |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
到NDB上 可以创建库 但是创建表就报错
mysql> use test;
Database changed
mysql> create table test111(id int,name char(10))engine=ndbcluster;
ERROR 1005 (HY000): Can't create table 'test.test111' (errno: 157)
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                                       |
| Error | 1005 | Can't create table 'test.test111' (errno: 157)                                  |
+-------+------+---------------------------------------------------

错误日志为
091201  1:30:05 [Note] NDB: NodeID is 4, management server '192.168.187.140:1186'
091201  1:30:06 [Note] NDB[0]: NodeID: 4, no storage nodes connected (timed out)
091201  1:30:06 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
091201  1:30:06 [Note] Starting Cluster Binlog Thread
091201  1:30:07 [Note] Event Scheduler: Loaded 0 events
091201  1:30:22 [Warning] NDB : Tables not available after 15 seconds.  Consider increasing --ndb-wait-setup value
091201  1:30:22 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.39-ndb-7.0.9-cluster-gpl'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Cluster Server (GPL)
2009-12-01 01:34:32 [NdbApi] INFO     -- Management server closed connection early. It is probably being shut down (or has problems). We will retry the connection. 110 Time out talking to management server Error line: 467
091201 02:01:12 mysqld_safe A mysqld process already exists
091201  2:02:15 [Warning] NDB: Could not acquire global schema lock (4009)Cluster Failur


求高手~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表