canal解析mysql binlogエラー:Did not write as much data as expected.

4627 ワード

canalバージョン:canal.deployer-1.1.3 Mysqlバージョン:5.6.41-log
エラー:
2019-06-13 10:16:08.825 [destination = bigdata_collect , address = /192.168.43.6: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-06-13 10:16:08.825 [destination = bigdata_collect , address = /192.168.43.6: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":"192.168.43.6","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000014","position":348217996,"serverId":1,"timestamp":1560391913000}}
2019-06-13 10:16:08.842 [destination = bigdata_collect , address = /192.168.43.6:3306 , EventParser] WARN  c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000014,position=348217996,serverId=1,gtid=,timestamp=1560391913000] cost : 17ms , the next step is binlog dump
2019-06-13 10:16:08.865 [destination = bigdata_collect , address = /192.168.43.6:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address 192.168.43.6/192.168.43.6:3306 has an error, retrying. caused by 
com.alibaba.otter.canal.parse.exception.CanalParseException: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: java.lang.IllegalStateException: Did not write as much data as expected.
    at com.google.protobuf.CodedOutputStream.checkNoSpaceLeft(CodedOutputStream.java:977) ~[protobuf-java-3.6.1.jar:na]
    at com.google.protobuf.ByteString$CodedBuilder.build(ByteString.java:1136) ~[protobuf-java-3.6.1.jar:na]
    at com.google.protobuf.AbstractMessageLite.toByteString(AbstractMessageLite.java:61) ~[protobuf-java-3.6.1.jar:na]
    at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEvent(LogEventConvert.java:564) ~[canal.parse-1.1.3.jar:na]
    at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$DmlParserStage.onEvent(MysqlMultiStageCoprocessor.java:330) ~[canal.parse-1.1.3.jar:na]
    at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$DmlParserStage.onEvent(MysqlMultiStageCoprocessor.java:316) ~[canal.parse-1.1.3.jar:na]
    at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143) ~[disruptor-3.4.2.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-internal/ThreadPoolExecutor.java:1158) ~[na:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-internal/ThreadPoolExecutor.java:632) ~[na:na]
    at java.lang.Thread.run(java.base@9-internal/Thread.java:804) [na:na]
2019-06-13 10:16:08.867 [destination = bigdata_collect , address = /192.168.43.6:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:bigdata_collect[com.alibaba.otter.canal.parse.exception.CanalParseException: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: java.lang.IllegalStateException: Did not write as much data as expected.
    at com.google.protobuf.CodedOutputStream.checkNoSpaceLeft(CodedOutputStream.java:977)
    at com.google.protobuf.ByteString$CodedBuilder.build(ByteString.java:1136)
    at com.google.protobuf.AbstractMessageLite.toByteString(AbstractMessageLite.java:61)
    at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEvent(LogEventConvert.java:564)
    at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$DmlParserStage.onEvent(MysqlMultiStageCoprocessor.java:330)
    at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$DmlParserStage.onEvent(MysqlMultiStageCoprocessor.java:316)
    at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-internal/ThreadPoolExecutor.java:1158)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-internal/ThreadPoolExecutor.java:632)
    at java.lang.Thread.run(java.base@9-internal/Thread.java:804)
]

解決方法:protobuf-java-3.6.1.JArをprotobuf-java-2.6.1に交換する.jar