Got error 157 'Connection to NDB failed' from NDBINFO

来源:互联网 发布:wine怎么卸载软件 编辑:程序博客网 时间:2024/06/10 14:52
mysql> use ndbinfo;120405 13:53:37 [Warning] NDB: Could not acquire global schema lock (4009)Cluster FailureReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changed


当mysql集群中管理节点故障,如ndb处于没有启动,shutdown,或网络异常的情况下。访问ndbifno中的表会出现错误

'Got error 157 'Connection to NDB failed' from NDBINFO'.(blocks,config_params除外)。

mysql> select count(1) from blocks;+----------+| count(1) |+----------+|       23 |+----------+1 row in set (0.00 sec)mysql> select count(1) from config_params;+----------+| count(1) |+----------+|      126 |+----------+1 row in set (0.00 sec)mysql> select count(1) from nodes;ERROR 1296 (HY000): Got error 157 'Connection to NDB failed' from NDBINFO



此时我们可以看到一些以ndb$开头的表,这些表有助于我们进一步研究mysql的ndbcluster。在不能访问NDB_MGM的情况下,是不能访问ndb$表的。

mysql> show tables;120405 13:53:41 [Warning] NDB: Could not acquire global schema lock (4009)Cluster Failure+---------------------------+| Tables_in_ndbinfo         |+---------------------------+| blocks                    || cluster_operations        || cluster_transactions      || config_params             || counters                  || diskpagebuffer            || logbuffers                || logspaces                 || memoryusage               || ndb$columns               || ndb$counters              || ndb$dblqh_tcconnect_state || ndb$dbtc_apiconnect_state || ndb$diskpagebuffer        || ndb$logbuffers            || ndb$logspaces             || ndb$nodes                 || ndb$operations            || ndb$pools                 || ndb$resources             || ndb$tables                || ndb$test                  || ndb$threadblocks          || ndb$threadstat            || ndb$transactions          || ndb$transporters          || nodes                     || resources                 || server_operations         || server_transactions       || threadblocks              || threadstat                || transporters              |+---------------------------+33 rows in set, 1 warning (0.00 sec)

mysql官方文档中的描述
If the mysqld process was not started with the --ndbcluster option, ndbinfo is not available and is not displayed by SHOW DATABASES.

If mysqld was formerly connected to a MySQL Cluster but the cluster becomes unavailable (due to events such as cluster shutdown,

loss of network connectivity, and so forth), ndbinfo and its tables remain visible, but an attempt to access any tables (other than blocks

or config_params) fails with Got error 157 'Connection to NDB failed'  from NDBINFO.



原创粉丝点击