开发者社区> 问答> 正文

一数据源多节点,有些节点延时严重

源目标是一个数据库,后面有20多个子节点同步里面的几个表。运行一段时间后,有几个节点的Bin-log的Position还是很早之前的。日志中不断输出:

[destination = xxx , address = /x.x.x.x:3306 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - Received EOF packet from server, apparent master disconnected. It's may be duplicate slaveId , check instance config

在“同步进度”中查看的信息中"identity":{"slaveId":-1, 因为几个节点都是部署在不同的机器上,slaveId都是-1,不知道是不是这个原因导致的。

另外一个问题:偶尔会报下面的错,停止,重新启动又正常了。 2017-05-04 00:58:47.268 [pipelineId = 17,taskName = SelectTask] WARN com.alibaba.otter.node.etl.select.SelectTask - WARN ## select is failed. java.lang.ClassCastException: com.alibaba.otter.canal.parse.inbound.AbstractEventParser$4 cannot be cast to com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser$MysqlDetectingTimeTask at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.stopHeartBeat(MysqlEventParser.java:186) ~[canal.parse-1.0.23.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser.stop(AbstractEventParser.java:282) ~[canal.parse-1.0.23.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.stop(MysqlEventParser.java:165) ~[canal.parse-1.0.23.jar:na] at com.alibaba.otter.canal.instance.core.AbstractCanalInstance.stop(AbstractCanalInstance.java:104) ~[canal.instance.core-1.0.23.jar:na] at com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded.stop(CanalServerWithEmbedded.java:116) ~[canal.server-1.0.23.jar:na] at com.alibaba.otter.node.etl.select.selector.canal.CanalEmbedSelector.stop(CanalEmbedSelector.java:225) ~[node.etl-4.2.14.jar:na] at com.alibaba.otter.node.etl.select.SelectTask.stopup(SelectTask.java:186) ~[node.etl-4.2.14.jar:na] at com.alibaba.otter.node.etl.select.SelectTask.run(SelectTask.java:121) ~[node.etl-4.2.14.jar:na] 2017-05-04 00:58:47.341 [pipelineId = 17,taskName = SelectTask] WARN c.a.o.s.a.i.setl.zookeeper.termin.WarningTerminProcess - nid:18[17:setl:java.lang.ClassCastException: com.alibaba.otter.canal.parse.inbound.AbstractEventParser$4 cannot be cast to com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser$MysqlDetectingTimeTask at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.stopHeartBeat(MysqlEventParser.java:186) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser.stop(AbstractEventParser.java:282) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.stop(MysqlEventParser.java:165) at com.alibaba.otter.canal.instance.core.AbstractCanalInstance.stop(AbstractCanalInstance.java:104) at com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded.stop(CanalServerWithEmbedded.java:116) at com.alibaba.otter.node.etl.select.selector.canal.CanalEmbedSelector.stop(CanalEmbedSelector.java:225) at com.alibaba.otter.node.etl.select.SelectTask.stopup(SelectTask.java:186) at com.alibaba.otter.node.etl.select.SelectTask.run(SelectTask.java:121) ]

原提问者GitHub用户 duson

展开
收起
大圣东游 2023-06-21 16:19:03 44 0
1 条回答
写回答
取消 提交回答
  • 换canal 1.0.24试试

    原回答者GitHub用户agapple

    2023-06-21 17:34:54
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载