当前位置:网站首页>Canal 报错 Could not find first log file name in binary log index file
Canal 报错 Could not find first log file name in binary log index file
2022-08-10 05:31:00 【开发老张】
查看 /home/admin/canal-server/logs/example/example.log 中有如下报错:
2022-07-20 00:00:08.473 [destination = example , address = mall-mysql/192.168.38.131:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:e
xample[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:238)
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:262)
at java.lang.Thread.run(Thread.java:748)
原因:
配置文件中设置的 binlog 文件没有找到
解决:
因为本例的 instance.properties 配置文件是打包到 docker 镜像中的,因此只能在实例中修改
先查看数据库中的 binlog 日志文件名及 position
在本例 mall-mysql 数据库中查询:
mysql> show master status;
输出的 File:mysql-binlog.000233,Position:652645
进入实例:
kubectl exec -ti mall-canal-84f6f7d7cc-xbghn bash -n nsName
xxx> vi /home/admin/canal-server/conf/example/instance.properties
修改其中的 position info 部分:
canal.instance.master.address=mall-mysql:3306
canal.instance.master.journal.name=mysql-binlog.000233
canal.instance.master.position=652645
canal.instance.master.timestamp=
canal.instance.master.gtid=
重启服务:
xxx> cd /home/admin/canal-server
xxx> ./restart.sh
重启后查看日志,故障消除
边栏推荐
猜你喜欢
随机推荐
An article will help you understand what is idempotency?How to solve the idempotency problem?
Pony语言学习(八):引用能力(Reference Capabilities)
Qiskit 学习笔记1
.las转.txt 再转.pcd,编译运行中出现的错误
SEO搜索引擎优化
YOLOv5 PyQt5(一起制作YOLOv5的GUI界面)
Hezhou ESP32C3 +1.8"tft network clock under Arduino framework
Interface debugging also can play this?
How to use Apifox's Smart Mock function?
pytorch框架学习(9)torchvision.transform
How to simulate the background API call scene, very detailed!
PCL,VS配置过程中出现:用 _sopen_s 代替 _open, 或用_CRT_SECURE_NO_WARNNINGS错误
How to improve product quality from the code layer
Practical skills 19: Several postures of List to Map List
OpenGauss source code, is it maintained with VSCode in the window system?
如何用Apifox 的智能Mock功能?
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
接口文档进化图鉴,有些古早接口文档工具,你可能都没用过
应用在智能触摸遥控器中的触摸芯片
Error when installing oracle rac 11g and executing root.sh