Error 1296 (HY000): Got error 157 ' Unknown error code ' from Ndbcluster

Source: Internet
Author: User

In a MySQL cluster test environment on one of the nodes (id=4 192.168.1.251) perform a select operation to hold

It is not a problem to execute the same statement on another node 192.168.1.252.

### #192.168.1.251######

Error as shown in caption:

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 the 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######

Split Line ******************************************************

### #192.168.1.252######

Mysql>
mysql> Use test
Reading table information for completion of table and column names
You can turn off the 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######

Split Line ***********************************************************

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

Back to the Management node view, found that the management node machine hung up.

Start the machine

To start the service:

[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##########################

The solution is to restart the node 192.168.1.251sql node.


[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)

The results seen in the management node are as above.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.