排查问题技巧:

MySQL Cluster 自带了一个错误代码的查看的小程序。通过这个小东西我们可以方便的定位问题的原因。 这个程序就是 perror 在MYSQL安装目录的bin下面。

如报错:ERROR 1005 (HY000) at line 474868: Can't create table 'Table Name'(errno: 136)

你可以用perror命令查询 错误原因:

#/usr/local/mysql/bin/perror --ndb 136
MySQL error code 136: No more room in index file

通过它的解释 我们把 index的相关选项改高一些。如下: (依实际情况决定数值大小)

MaxNoOfTables: 1024
MaxNoOfOrderedIndexes: 1024
MaxNoOfUniqueHashIndexes: 1024

这样问题就能解决了。

问题1:在线添加节点后使用 ALTER ONLINE TABLE TABLENAME REORGANIZE PARTITIO N命令 将表数据在数据节点上重新分配时报错:

mysql> alter online table Billinfo reorganize partition;
ERROR 1297 (HY000): Got temporary error 410 'REDO log files overloaded (decrease TimeBetweenLocalCheckpoints or increase
NoOfFragmentLogFiles)' from NDBCLUSTER

解决方法:

调整管理节点上的config.ini配置文件里[ndbd default]下的 TimeBetweenLocalCheckpoints 值和  FragmentLogFileSize 值

TimeBetweenLocalCheckpoints 参数:

Default value = 20
Changed it to TimeBetweenLocalCheckpoints =6
Setting TimeBetweenLocalCheckpoints to 6 or less means that local checkpoints will be executed continuously without pause, independent of the cluster's workload.

FragmentLogFileSize 参数:

Default value = 16M
Changed it to FragmentLogFileSize=256M
Setting this parameter allows you to control directly the size of the redo log files. This can be useful in situations when MySQL Cluster is operating under a high load and it is unable to close fragment log files quickly enough before attempting to open new ones. Increasing the size of the fragment log files gives the cluster more time before having to open each new fragment log file.

问题2:插入数据时,报错ERROR 1297 (HY000): Got temporary error 4010 'Node failure caused abort of transaction' from NDBCLUSTER,数据节点强制关闭。

解决方法: 加大:MaxNoOfConcurrentTransactions 和 MaxNoOfConcurrentOperations 参数

问题3:ERROR 1297 (HY000) at line 1872: Got temporary error 410 'REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or incre' from NDBCLUSTER

Solution : Modify / Add parameter TimeBetweenLocalCheckpoints in your config.ini.
Default value = 20
Changed it to TimeBetweenLocalCheckpoints =6
Setting TimeBetweenLocalCheckpoints to 6 or less means that local checkpoints will be executed continuously without pause, independent of the cluster's workload.

问题4:error 2815: 'File not found(Ndbd file system inconsistency error, please report a bug). Ndbd file system error, restart node initial'.

解决方法:增大config.ini文件中的 NoOfFragmentLogFiles 和 RedoBuffer 参数

问题5:错误日志:

Status:Temporary error,restart node

Message:System error,node killed during node restart by other node (Internal error,programming error or missing error message, please report a bug)

Error:2303

Error data:Node 12 killed this node because GCp stop was detected

Error object:NDBCNTR (Line:273)Ox000006

原因:这个问题是因为undo日志空间文件 用完了。

解决方法:增加 undo日志空间文件 ,语法如下

alter logfile group lg_1 add undofile 'undo_2.log' initial_size 1024M engine ndbcluster;

参考:http://blog.csdn.net/chenxingzhen001/article/details/7598167


NDB常见错误指南

在安装和使用mysql cluster集群的过程中,遇到了很多问题,现在把那些问题列出来,并复上解决方法,希望大家在以后的使用中能少花时间少走弯路:

1、导入数据的时候遇到如下报错

ERROR 1005 (HY000) at line 25: Can't create table 'tuge.pangolin_fnc_accountverification' (errno: 140)
Error | 1296 | Got error 738 'Record too big' from NDB

分析原因:表行数据太大

解决办法:需要更改表结构,使最大单行数据的大小小于8KB!

2、导入大量数据的时候遇到如下报错

Error 1297: Got temporary error 'REDO' log overloaded.       
ERROR : Got temporary error 1204 'Temporary failure, distribution changed' from NDBCLUSTER
ERROR : Got temporary error 1234 'REDO log files overloaded (increase disk hardware)' from NDBCLUSTER

分析原因:遇到这个错误,是表示redo log用完了,需要增加

解决办法:修改config.ini文件,更改或添加如下参数:

FragmentLogFileSize=256M
NoOfFragmentLogFiles=16

NoOfFragmentLogFiles这个参数可以更改到更大,但是初始化的时候会慢一点

3、在导入大量数据的时候,出现如下报错:

ERROR 1114 (HY000) at line 54: The table 'gps_led_sendadverthistory' is full

分析原因:你分配的内存或者硬盘空间已经用完(如果你采用磁盘表的话),需要通过ndb管理节点客户端和登录mysql查看具体的原因,通过ndb_mgm登录,执行命令:

All report memory 看下分配的内存是否使用完,如果采用磁盘表的,还需要登录mysqld节点,然后执行如下查询,来确定是否是磁盘不足:

SELECT TABLESPACE_NAME, FILE_NAME, EXTENT_SIZE*TOTAL_EXTENTS/1024/1024 AS TOTAL_MB, EXTENT_SIZE*FREE_EXTENTS/1024/1024 AS FREE_MB, EXTRA FROM information_schema.FILES WHERE FILE_TYPE="DATAFILE";

解决办法:如果是数据内存不足的情况,直接更改文件config.ini中[NDBD DEFAULT]下的

DataMemory=11480M
IndexMemory=1024M

根据实际情况加大

如果是采用磁盘表,磁盘文件空间不足的情况,就需要添加磁盘文件,格式如下:

ALTER TABLESPACE ts_1
ADD DATAFILE 'data_4.dat'
INITIAL_SIZE 10240M
ENGINE NDBCLUSTER;

4、在还原的时候遇到如下报错:

Configuration error: Error : Could not alloc node id at 192.168.100.223 port 1186: Id 12 configured as ndbd(NDB), connect attempted as mysqld(API).
Unable to connect to management server.

分析原因:因为还原的时候会去连接mysqld,而在配置ndb的时候没有添加空的mysqld节点,因此出现这个报错

解决办法:在config.ini添加几个空的mysqld节点,语法如下:

[mysqld]
[mysqld]
[mysqld]
[mysqld]

5、导入大量数据的时候或者执行大量的insert或者update操作的时候,经常会出现如下报错:

ERROR 1297 (HY000) at line 1: Got temporary error 1218 'Send Buffers overloaded in NDB kernel' from NDBCLUSTER

这个报错的原因有几个,第一、是参数SendBufferMemory设置过小,第二、和mysqld的二进制日志有关系,第三、和网络环境有关系
解决办法:查看网络环境是否OK ,是否出现双工模式部队,是否都是千兆网或者百兆网,加大SendBufferMemory的设置,一般2M就够了,设置TotalSendBufferMemory = 256M,最后如果还是出现如此报错,建议关闭mysql的二进制日志,在my.cnf中注释掉相关的参数就可以了,比如:

#log-bin=mysql-bin

6、错误日志

Status: Temporary error, restart node
Message: System error, node killed during node restart by other node (Internal error, programming error or missing error message, please report a bug)
Error: 2303
Error data: Node 12 killed this node because GCP stop was detected
Error object: NDBCNTR (Line: 273) 0x00000006

分析原因:这个问题是因为undo日志文件空间用完了!

解决办法:增加undo日志空间文件,语法如下:

ALTER LOGFILE GROUP lg_1
ADD UNDOFILE 'undo_2.log'
INITIAL_SIZE 2048M
ENGINE NDBCLUSTER;

7、还原的时候出现如下报错:

Temporary error: 266: Time-out in NDB, probably caused by deadlock

分析原因:出现这个问题是锁定超过1.2s

解决办法:在config.ini中加入:TransactionDeadLockDetectionTimeOut=10000 默认是1200

8、创建日志文件组的时候,出现如下报错:

Error CODE : 1528 Failed TO CREATE LOGFILE GROUP

用SHOW WARNINGS;       查看详细报错如下:

Got error 1504 'Out of logbuffer memory' FROM NDB
Failed TO CREATE LOGFILE GROUP

分析原因:是因为SharedGlobalMemory的值比UNDO_BUFFER_SIZE小导致错误

解决办法:把SharedGlobalMemory调大,原来我的UNDO_BUFFER_SIZE为128,但是我的SharedGlobalMemory为80,将SharedGlobalMemory设置成384M解决问题。

参考:http://blog.chinaunix.net/uid-20682026-id-3257100.html


【个人实践】在SQL语言数据还原时,遇到如下问题:

问题1:导入“数据表结构”前,要做如下替换处理

(1).将引擎 ENGINE=MyISAM 和 ENGINE=InnoDB 为 ENGINE=ndbcluster;

(2).把类似 KEY `user_guid` (`user_guid`) USING HASH 中的 USING HASH 去掉,否则会出现类型“#1112 - Table 'tk_user' uses an extension that doesn't exist in this MySQL version”的错误;

问题2:MySQL Cluster导入“数据表结构”时报错:Got error 708 'No more attribute metadata records (increase MaxNoOfAttributes)' from NDBCLUSTER

问题3:ERROR 1114 (HY000) at line 209502: The table 'tk_feed' is full

ndb_mgm> Node 12: Data usage decreased to 80%(2073 32K pages of total 2560)
Node 11: Data usage decreased to 78%(2012 32K pages of total 2560)
Node 12: Data usage decreased to 78%(2006 32K pages of total 2560)
Node 11: Data usage increased to 80%(2053 32K pages of total 2560)
Node 12: Data usage increased to 80%(2064 32K pages of total 2560)
Node 12: Data usage increased to 90%(2304 32K pages of total 2560)

解决方法:调整如下参数

DataMemory=15000M
IndexMemory=2560M

参考:http://stackoverflow.com/questions/5641156/mysql-cluster-the-table-is-full-workaround

问题4:ERROR 1297 (HY000) at line 421616: Got temporary error 4010 'Node failure caused abort of transaction' from NDBCLUSTER

解决方法:调整如下参数

MaxNoOfConcurrentTransactions = 16384
MaxNoOfConcurrentOperations = 100000
MaxNoOfLocalOperations = 100000

按照上面调整了参数,但“sql语言数据还原”时,还是报上面的错,最后通过继续修改如下参数,问题才给解决(泪奔):

FragmentLogFileSize = 256M
NoOfFragmentLogFiles = 16


其他参考:

MySQL-Cluster测试过程中问题解决记录

【推荐】MySQL Cluster测试过程中的错误汇总--ERROR 1296 (HY000)等等

【推荐】MySQL Cluster报错及解决方法(不断更新中)相关推荐

  1. MySQL 安装报错的解决方法

    MySQL 安装报错的解决方法 前言 mysql 使用的是官网下载的安装包,mysql-installer-community-8.0.25.0.msi ,第一次安装时很顺利,因为某些原因要卸载重新安 ...

  2. mysql笔记(一):Navicat for MySQL远程连接mysql服务报错的解决方法(1130、2509)

    第一个报错: 错误代码是1130,ERROR 1130: Host X.X.X.X is not allowed to connect to this MySQL server 解决方法: 在服务器登 ...

  3. node.js 中Mysql 查询报错 ,解决方法。

    1.报错: throw err; // Rethrow non-MySQL errors 2.问题出处 mysql\lib\protocol\Parser.js:437 抛出异样,try..catch ...

  4. mysql 执行报错及解决方法 Multi-statement transaction required more than ‘max_binlog_cache_size‘

    mysql数据库执行update语句,报错. 导入数据库的时候报了一个错: Multi-statement transaction required more than 'max_binlog_cac ...

  5. hive 安装mysql报错_hive的元数据存储在mysql后,报错的解决方法

    最近,因为工作的需要,一直在研究hadoop系统.许多分析工作都将通过hive来解决,所以特将所碰到的问题和解决方案,陆续整理出来,既做为回顾又供需要的朋友参考! 因为要实现多人开发Hive,所以需要 ...

  6. 使用Navicat连接MySQL时出现2059报错的解决方法

    使用Navicat连接MySQL时出现2059报错的解决方法 参考文章: (1)使用Navicat连接MySQL时出现2059报错的解决方法 (2)https://www.cnblogs.com/ir ...

  7. mysql adminer 导入csv_mysql导入csv的4种报错的解决方法

    以此悼念我今天踩过的4个坑-- 坑一:local的错 报错: error 3948 (42000): loading local data is disabled; this must be enab ...

  8. kettle连接数据mysql查_Kettle连接MySQL报错的解决方法

    使用Kettle报错的解决方法 1.当你在navicat上面测试数据库连接的时候可以看到数据库连接成功.而在Kettle上面连接同样的库的时候报出一大段错误出来,这时候是不是感觉有点懵逼了. 错误内容 ...

  9. mysql数据库表字段使用DESC等关键字报错及解决方法

    mysql数据库表字段使用DESC等关键字报错及解决方法 参考文章: (1)mysql数据库表字段使用DESC等关键字报错及解决方法 (2)https://www.cnblogs.com/li--xi ...

最新文章

  1. R语言使用ggplot2包使用geom_boxplot函数绘制基础分组箱图(输出多个分组)实战
  2. php fastcgi_param,nginx-404与root指令 fastcgi_param 指令
  3. AudioManager播放音乐
  4. 十万条评论告诉你,给《流浪地球》评1星的都是什么心态?
  5. 英特尔Nehalem微架构三级缓存原理学习
  6. 计算机房安全等级标准,电子计算机房的分级标准
  7. python爬虫从小白到高手 Day1 爬取百度音乐歌单
  8. 查看oracle的service name
  9. ae效果英文版翻译对照表_AE表达式中英文对照表.doc
  10. 爬虫-网易云音乐视频下载链接
  11. FastStone Capture滚动截屏
  12. 如何将word转换成pdf?超实用的使用教程免费分享
  13. FeedDemon 实务讲义
  14. RecSys‘22 推荐系统论文梳理
  15. 使用脚本批量上传内购商品
  16. 组件‘mscomctl.ocx‘或它的一个依赖项没有正确注册:一个文件丢失或无效
  17. 10种世界上最美的花
  18. Golang | 优雅地定义枚举类型
  19. 已解决org.springframework.beans.factory.UnsatisfiedDependencyException org.springframework.beans.factor
  20. python数据分析岗位_数据分析岗位招聘情况

热门文章

  1. linux nor flash 读写,9.2 NorFLASH读写实验——M25PExx
  2. 广告点击率预测_精品案例|在线广告点击率预测
  3. 基于fpga的数码管动态扫描电路设计_【至简设计案例系列】基于FPGA的密码锁设计(altera版)...
  4. python matplotlib画数据分布图_Python数据可视化之matplotlib
  5. Java学习总结:19
  6. c语言子程序return,c语言return返回到哪
  7. 上海职称英语和计算机考试时间,上海职称英语考试时间
  8. 微信小程序去除左上角返回的按钮
  9. linux下activemq安装与配置
  10. 如何用Python做Web开发?——Django环境配置