Error in Log_event::read_log_event(): 'Event too small', data_len: 0, event_type: 0
MySQL主从复制报错如下:
2018-04-11 09:11:16 2400 [Note] Slave SQL thread initialized, starting replication in log 'binlog.000042' at position 1934531, relay log '/mysql/data/relay_bin.000053' position: 1934691
2018-04-11 09:11:16 2400 [ERROR] Error in Log_event::read_log_event(): 'Event too small', data_len: 0, event_type: 0
2018-04-11 09:11:16 2400 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
2018-04-11 09:11:16 2400 [ERROR] Slave SQL: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594
2018-04-11 09:11:16 2400 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'binlog.000042' position 1934531
三台虚拟机做的MHA主从复制,由于经常开关机导致会出现此类错误。如上所示:
We stopped at log 'binlog.000042' position 1934531
解决办法是直接在slave上执行如下命令:
stop slave;
reset slave all;
change master to master_host='192.168.20.70',master_user='rep',master_password='rep',master_log_file='binlog.000042',master_log_pos=1934531;
start slave;
就按报错所示的binlog和pos进行主从复制的重置,之后就可以正常运行。
出现此报错可能的原因:
如error日志中所显示的原因,可能是主库的binlog损坏或者从库的relaylog损坏,或者网络问题,导致主从复制异常中断,此时只要重新执行change master即可。但是极端情况下由主从各自实例恢复造成的不一致无法进行恢复,只能重做主从。
Error in Log_event::read_log_event(): 'Event too small', data_len: 0, event_type: 0的更多相关文章
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
分析从库1062问题,解析从库binlog日志,报错如下 [root@xxxdb0402 tmp]# mysqlbinlog mysql-bin.004271 > 4.log ERROR: Er ...
- mysqlbinlog错误:Error in Log_event::read_log_event(): 'read error'
环境: mysql 5.6 ; binlog 3.4 ; binlog_format MIXED ; .报错: mysqlbinlog -v --start-position=166084123 m ...
- ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 31, event_type: 35报错处理
centos7系统MySQL5.7在用mysqlbinlog命令查询binlog日志时刚开始查询即自动终止查询,查了一下该日志有300M,于是仔细看发现有报错,见下图: 在网上查找经验贴http:// ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0'
七月 05, 2018 10:26:54 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRul ...
- 07 oracle 归档模式 inactive/current redo log损坏修复--以及错误ORA-00600: internal error code, arguments: [2663], [0], [9710724], [0], [9711142], [], [], [], [], [], [], []
07 oracle 归档模式 inactive/current redo log损坏修复--以及错误ORA-00600: internal error code, arguments: [2663], ...
- Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法
贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...
- error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项:值“0”不匹配值“2”
error: vtkCommon.lib(vtkSmartPointerBase.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项:值“0”不 ...
- android sdk启动报错error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037:
android sdk启动报错error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 问题原因: ...
- (原)error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”
转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5577534.html 在debug下使用intel的mkl库时(release下无此问题),莫名的出现 ...
随机推荐
- leetcode — permutation-sequence
import java.util.ArrayList; import java.util.List; /** * Source : https://oj.leetcode.com/problems/p ...
- oracle触发器使用
转自: http://www.cnblogs.com/wishyouhappy/p/3665851.html 1.说明 1)触发器是一种特殊的存储过程,触发器一般由事件触发并且不能接受参数,存储器由语 ...
- python 闯关之路二(模块的应用)
1.有如下字符串:n = "路飞学城"(编程题) - 将字符串转换成utf-8的字符编码的字节,再将转换的字节重新转换为utf-8的字符编码的字符串 - 将字符串转换成gbk的字符 ...
- shell测试命令test、[ ]、[[ ]]
bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html test可用于测试表达式,支持测试的范围包括:字符串比较,算术 ...
- 利用Python测量滴水湖的水面面积
美丽的滴水湖 美丽的滴水湖坐落在上海的东南角,濒临东海,风景秀丽,安静舒适,是旅游.恋爱的绝佳去处.笔者有幸去过一回,对那儿的风土人情留下了深刻的印象,如果有机会,笔者还会多去几次! 滴水湖是 ...
- JavaScript数组入门。
JavaScript中的array对象就是数组,首先是一个动态数组,而且是一个像c#中 数组 arraylist hashtable等的综合体. var arr = [1, 7, 3, 4, 5]; ...
- IIS域名转发
在IIS中设置Http重定向 界面操作如下: 最终通过上面的操作生成了一个配置文件如下: 我这面就是一个空的目录,里面仅包含这个配置文件,就可以实现转发啦
- 利用OpenCV给图像添加中文标注
利用OpenCV给图像添加中文标注 : 参考:http://blog.sina.com.cn/s/blog_6bbd2dd101012dbh.html 和https://blog.csdn.net/ ...
- 如何在Promise链中共享变量?
译者按: 使用Promise写过异步代码的话,会发现在Promise链中共享变量是一个非常头疼的问题,这也是Async/Await胜过Promise的一点,我们在Async/Await替代Promis ...
- Java并发编程学习:volatile关键字解析
转载:https://www.cnblogs.com/dolphin0520/p/3920373.html 写的非常棒,好东西要分享一下 Java并发编程:volatile关键字解析 volatile ...