求解答 這個是什麼原因或者給個思路
我搭建了一個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
---------------------
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)
1 node(s)
id=1 @192.168.187.140 (mysql-5.1.39 ndb-7.0.9)
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 NDB: NodeID is 4, management server '192.168.187.140:1186'
091201 1:30:06 NDB: NodeID: 4, no storage nodes connected (timed out)
091201 1:30:06 NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
091201 1:30:06 Starting Cluster Binlog Thread
091201 1:30:07 Event Scheduler: Loaded 0 events
091201 1:30:22 NDB : Tables not available after 15 seconds. Consider increasing --ndb-wait-setup value
091201 1:30:22 /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 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 NDB: Could not acquire global schema lock (4009)Cluster Failur
求高手~~
《解決方案》
回復 #1 skyuun 的帖子
去嘗試下這個SELINUX=disabled
[ 本帖最後由 kns1024wh 於 2009-12-2 20:59 編輯 ]
《解決方案》
我的這個問題和 磁碟 性能 內存什麼的 沒任何關係
請不要亂跟帖
《解決方案》
原帖由 skyuun 於 2009-12-2 12:51 發表 http://linux.chinaunix.net/bbs/images/common/back.gif
我的這個問題和 磁碟 性能 內存什麼的 沒任何關係
請不要亂跟帖
mysql> create table test111(id int,name char(10))engine=ndbcluster;
ERROR 1005 (HY000): Can't create table 'test.test111' (errno: 157)
仔細檢測一下配置
[ 本帖最後由 kns1024wh 於 2009-12-2 21:00 編輯 ]
《解決方案》
已經解決 不是SELINUX的問題也不是配置文件的問題
自己找到了方法 發了4天帖子沒人正確回答我的。。算了
《解決方案》
回復 #5 skyuun 的帖子
額。。到底怎麼解決啊,我今天也遇到了這樣的問題,樓主分享下吧。
《解決方案》
看樣子這個東東還是用的人少了。