环境信息
canal version 1.1.3 mysql version 5.7.20
问题描述
canal 1.1.3使用dynamicTopic配置,启动Canal server后报ack error异常, 阻塞binlog的解析
2019-01-16 00:03:27.327 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - ack error , clientId:1001 batchId:357 is not exist , please check com.alibaba.otter.canal.server.exception.CanalServerException: ack error , clientId:1001 batchId:357 is not exist , please check 2019-01-16 00:03:27.327 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - ack error , clientId:1001 batchId:357 is not exist , please check com.alibaba.otter.canal.server.exception.CanalServerException: ack error , clientId:1001 batchId:357 is not exist , please check 2019-01-16 00:04:18.811 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - batchId:406 is not the firstly:405 com.alibaba.otter.canal.meta.exception.CanalMetaManagerException: batchId:406 is not the firstly:405 2019-01-16 00:04:18.811 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - batchId:406 is not the firstly:405 com.alibaba.otter.canal.meta.exception.CanalMetaManagerException: batchId:406 is not the firstly:405 2019-01-16 00:04:18.877 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - batchId:407 is not the firstly:405 com.alibaba.otter.canal.meta.exception.CanalMetaManagerException: batchId:407 is not the firstly:405 2019-01-16 00:04:18.877 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - batchId:407 is not the firstly:405 com.alibaba.otter.canal.meta.exception.CanalMetaManagerException: batchId:407 is not the firstly:405 2019-01-16 00:04:18.941 [pool-5-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - batchId:408 is not the firstly:405 com.alibaba.otter.canal.meta.exception.CanalMetaManagerException: batchId:408 is not the firstly:405
运行环境:两台Canal sever服务器,使用zookeeper做高可用 对接RocketMQ集群 ,使用dynamicTopic配置自动创建topic
原提问者GitHub用户flackyang
根据报错信息分析,可能是由于Canal批次管理机制导致的,它通过batchId记录已经发送到MQ的批次,以确保每个批次仅被处理一次。其中一个错误提示是这个batchId不是第一个,因此可能是Canal间的处理顺序问题导致的。
建议你检查一下Canal的动态topic的配置是否准确无误,特别是在进行重复数据过滤时,确保相同的数据不会被多次发送。同时检查有无多个Canal server在向同一个topic发送数据,或者在集群中有多个Canal server实例连接到同一组zookeeper节点。
另外,建议升级Canal的版本到最新,以解决一些版本中存在的已知问题。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。