现在的位置: 首页 > 综合 > 正文

ERROR 1296 (HY000): Got error 157 ‘Unknown error code’ from NDBCLUSTER

2013年10月11日 ⁄ 综合 ⁄ 共 2190字 ⁄ 字号 评论关闭

在mysql cluster 测试环境的其中一个节点上(id=4 192.168.1.251)执行 select 操作抱

而在 另外一个节点 192.168.1.252上执行相同的语句是没有问题的。

####192.168.1.251######

标题所示的错误:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| ndbinfo            |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.00 sec)

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;

 

+----------------+
| Tables_in_test |
+----------------+
| teacher        |
+----------------+
1 row in set, 1 warning (6.95 sec)
 
mysql> select * from teacher;
ERROR 1296 (HY000): Got error 157 'Unknown error code' from NDBCLUSTER
mysql>

 

####192.168.1.251######

************************分割线******************************************************

####192.168.1.252######

mysql>
mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| teacher        |
+----------------+
1 row in set (0.00 sec)

mysql> select * from teacher ;
+------+
| t_id |
+------+
|  188 |
+------+

####192.168.1.252######

*********************分割线***********************************************************

######192.168.1.244####################

回头去管理节点查看  ,发现管理节点机器挂了。

启动机器

启动服务 :

 

[root@slaver244 ~]# ndb_mgmd -f /app/mysql_cluster/config.ini
MySQL Cluster Management Server mysql-5.5.30 ndb-7.2.12
[root@slaver244 ~]#
[root@slaver244 ~]#
[root@slaver244 ~]# 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.1.246  (mysql-5.5.30 ndb-7.2.12, Nodegroup: 0)
id=3    @192.168.1.250  (mysql-5.5.30 ndb-7.2.12, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.1.244  (mysql-5.5.30 ndb-7.2.12)

[mysqld(API)]   2 node(s)
id=4 (not connected, accepting connect from 192.168.1.251)
id=5    @192.168.1.252  (mysql-5.5.30 ndb-7.2.12)

ndb_mgm>
ndb_mgm>

#######192.168.1.244##########################

 

解决办法是重启 节点 192.168.1.251sql节点。

[mysqld(API)]   2 node(s)
id=4    @192.168.1.251  (mysql-5.5.30 ndb-7.2.12)
id=5    @192.168.1.252  (mysql-5.5.30 ndb-7.2.12)

在管理节点中看到的结果如上。

 

 

 

 

抱歉!评论已关闭.