开发者社区> 问答> 正文

Canal推送到RocketMQ,出现null数据以及ArithmeticException

Canal日志 2019-10-10 13:47:57.484 [pool-4-thread-1] ERROR com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer - java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero at com.alibaba.otter.canal.common.utils.ExecutorTemplate.waitForResult(ExecutorTemplate.java:74) ~[canal.common-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.send(CanalRocketMQProducer.java:199) ~[canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.send(CanalRocketMQProducer.java:106) ~[canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:183) [canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:23) [canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:225) [canal.server-1.1.5-SNAPSHOT.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_202] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202] Caused by: java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_202] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_202] at com.alibaba.otter.canal.common.utils.ExecutorTemplate.waitForResult(ExecutorTemplate.java:72) ~[canal.common-1.1.5-SNAPSHOT.jar:na] ... 8 common frames omitted Caused by: java.lang.ArithmeticException: / by zero at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.sendMessage(CanalRocketMQProducer.java:254) ~[canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.access$200(CanalRocketMQProducer.java:36) ~[canal.server-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer$3.run(CanalRocketMQProducer.java:192) ~[canal.server-1.1.5-SNAPSHOT.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_202] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_202] ... 3 common frames omitted 2019-10-10 13:54:14.967 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop CannalInstance for null-example 2019-10-10 13:54:15.083 [pool-4-thread-1] ERROR com.alibaba.otter.canal.server.CanalMQStarter - process error! com.alibaba.otter.canal.server.exception.CanalServerException: destination:example should start first 2019-10-10 13:54:15.198 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop successful.... 2019-10-10 13:54:15.222 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-10-10 13:54:15.223 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2019-10-10 13:54:15.239 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-10-10 13:54:15.239 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2019-10-10 13:54:15.266 [canal-instance-scan-0] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2019-10-10 13:54:15.266 [canal-instance-scan-0] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ 2019-10-10 13:54:15.267 [canal-instance-scan-0] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : 2019-10-10 13:54:15.268 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2019-10-10 13:54:15.285 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> begin to find start position, it will be long time for reset or first position 2019-10-10 13:54:15.286 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"localhost.localdomain","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000001","position":11085,"serverId":1,"timestamp":1570686516000}} 2019-10-10 13:54:15.304 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000001,position=11085,serverId=1,gtid=,timestamp=1570686516000] cost : 19ms , the next step is binlog dump 2019-10-10 13:54:20.458 [Thread-6] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop CannalInstance for null-example 2019-10-10 13:54:21.345 [Thread-6] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop successful.... 2019-10-10 13:54:31.652 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-10-10 13:54:31.654 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2019-10-10 13:54:31.754 [main] WARN o.s.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'connectionCharset' being accessed! Ambiguous write methods found next to actually used [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.nio.charset.Charset)]: [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.lang.String)] 2019-10-10 13:54:31.777 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-10-10 13:54:31.777 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2019-10-10 13:54:32.031 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2019-10-10 13:54:32.036 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ 2019-10-10 13:54:32.036 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : 2019-10-10 13:54:32.090 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> begin to find start position, it will be long time for reset or first position 2019-10-10 13:54:32.107 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2019-10-10 13:54:32.120 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"localhost.localdomain","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000001","position":11085,"serverId":1,"timestamp":1570686516000}} 2019-10-10 13:54:32.405 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000001,position=11085,serverId=1,gtid=,timestamp=1570686516000] cost : 297ms , the next step is binlog dump

RocketMQ

root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 18 2019-10-10 13:48:36,303 dockerone 1 0 4 2019-10-10 13:48:36,303 dockerone 2 0 4 2019-10-10 13:48:36,305 dockerone 3 0 3 2019-10-10 13:48:36,305 root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 18 2019-10-10 13:48:36,303 dockerone 1 0 4 2019-10-10 13:48:36,303 dockerone 2 0 4 2019-10-10 13:48:36,305 dockerone 3 0 3 2019-10-10 13:48:36,305 root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 19 2019-10-10 13:54:59,893 dockerone 1 0 5 2019-10-10 13:54:59,897 dockerone 2 0 5 2019-10-10 13:54:59,893 dockerone 3 0 4 2019-10-10 13:54:59,894 root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 19 2019-10-10 13:54:59,893 dockerone 1 0 5 2019-10-10 13:54:59,897 dockerone 2 0 5 2019-10-10 13:54:59,893 dockerone 3 0 4 2019-10-10 13:54:59,894 root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 20 2019-10-10 13:58:00,982 dockerone 1 0 6 2019-10-10 13:58:00,983 dockerone 2 0 6 2019-10-10 13:58:00,981 dockerone 3 0 5 2019-10-10 13:58:00,982 root@dockerone:/opt/rocketmq/bin# ./mqadmin topicStatus -n 127.0.0.1:9876 -t example Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0 #Broker Name #QID #Min Offset #Max Offset #Last Updated dockerone 0 0 21 2019-10-10 14:00:41,310 dockerone 1 0 7 2019-10-10 14:00:41,309 dockerone 2 0 7 2019-10-10 14:00:41,310 dockerone 3 0 6 2019-10-10 14:00:41,311

canal版本是v1.1.5-alpha-1

原提问者GitHub用户offSwitch

展开
收起
Java工程师 2023-05-03 16:17:34 141 0
1 条回答
写回答
取消 提交回答
  • 重新基于主干打包试试

    原回答者GitHub用户agapple

    2023-05-04 17:59:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
行业实践:RocketMQ 业务集成典型行业应用和实践 立即下载
技术揭秘:RocketMQ 5.0 云原生架构升级之路 立即下载
RocketMQ Summit 2022 开源生态发展 立即下载