开发者社区> 问答> 正文

Flink报错Encountered change event for table yhtplus.

已解决

Flink报错Encountered change event for table yhtplus.organization whose schema isn't known to this connector

展开
收起
阿里云服务支持 2022-12-20 14:33:09 425 0
1 条回答
写回答
取消 提交回答
  • 官方回答

    报错详情:

    ERROR io.debezium.connector.mysql.BinlogReader [] - Encountered change event 'Event{header=EventHeaderV4{timestamp=xxx, eventType=TABLE_MAP, serverId=xxx, headerLength=xxx, dataLength=xxx, nextPosition=xxx, flags=xxx}, data=TableMapEventData{tableId=xxx, database='xxx', table='xxx', columnTypes=xxx, xxx..., columnMetadata=xxx,xxx..., columnNullability={xxx,xxx...}, eventMetadata=null}}' at offset {ts_sec=xxx, file=mysql-bin.xxx, pos=xxx, gtids=xxx, server_id=xxx, event=xxx} for table xxx.xxx whose schema isn't known to this connector. One possible cause is an incomplete database history topic. Take a new snapshot in this case. Use the mysqlbinlog tool to view the problematic event: mysqlbinlog --start-position=30946 --stop-position=31028 --verbose mysql-bin.004419 202x-xx-xx xx:xx:xx,xxx ERROR io.debezium.connector.mysql.BinlogReader [] - Error during binlog processing. Last offset stored = null, binlog reader near position = mysql-bin.xxx/xxx 202x-xx-xx xx:xx:xx,xxx ERROR io.debezium.connector.mysql.BinlogReader [] - Failed due to error: Error processing binlog event org.apache.kafka.connect.errors.ConnectException: Encountered change event for table statistic.apk_info whose schema isn't known to this connector at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241) ~[ververica-connector-mysql-1.12-vvr-3.0.0-SNAPSHOT-jar-with-dependencies.jar:1.12-vvr-3.0.0-SNAPSHOT] at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218) ~[ververica-connector-mysql-1.12-vvr-3.0.0-SNAPSHOT-jar-with-dependencies.jar:1.12-vvr-3.0.0-SNAPSHOT]。

    报错原因:

    使用了debezium.snapshot.mode=never导致可能出现该错误。

    解决方案:

    不建议使用debezium.snapshot.mode=never,因为never会从binlog开头读取数据, 但是binlog开头的binlog事件对应的table schema和当前表的schema可能不匹配,所以会报该错误。 可以通过'debezium.inconsistent.schema.handling.mode'='warn'参数绕过。

    2022-12-20 14:36:57
    赞同 展开评论 打赏
来源圈子
更多
收录在圈子:
作为全球云计算的领先者,阿里云为全球230万企业提供着云计算服务,服务范围覆盖200多个国家和地区。我们致力于为企业、政府等组织机构提供安全可靠的云计算服务,给用户带来极速愉悦的服务体验。
问答排行榜
最热
最新

相关电子书

更多
Flink CDC Meetup PPT - 龚中强 立即下载
Flink CDC Meetup PPT - 王赫 立即下载
Flink CDC Meetup PPT - 覃立辉 立即下载