You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by kingdomad <ki...@163.com> on 2021/06/16 08:28:14 UTC

flink cdc对接多主mysql集群要怎么配置

flink cdc对接多主的mysql集群会报错如下,请问要怎么配置。感谢各位大佬。


2021-06-16 16:26:46 ERROR [blc-centos7-01:3306] io.debezium.connector.mysql.BinlogReader:864 - Encountered change event 'Event{header=EventHeaderV4{timestamp=1623829662000, eventType=TABLE_MAP, serverId=2, headerLength=19, dataLength=97, nextPosition=51557, flags=0}, data=TableMapEventData{tableId=519, database='test3', table='order_main', columnTypes=8, 15, 15, 15, 3, 15, 15, 8, 15, 18, 3, 3, 3, 3, 15, 15, 3, 8, 18, 8, 18, 3, 15, 15, 3, 15, columnMetadata=0, 200, 80, 400, 0, 80, 256, 0, 400, 0, 0, 0, 0, 0, 400, 4000, 0, 0, 0, 0, 0, 0, 40, 1020, 0, 400, columnNullability={1, 2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}, eventMetadata=TableMapEventMetadata{signedness={}, defaultCharset=255, charsetCollations=null, columnCharsets=null, columnNames=null, setStrValues=null, enumStrValues=null, geometryTypes=null, simplePrimaryKeys=null, primaryKeysWithPrefix=null, enumAndSetDefaultCharset=null, enumAndSetColumnCharsets=null}}}' at offset {ts_sec=1623829662, file=binlog.000001, pos=51370, gtids=45ac41f5-69b4-11eb-ad27-000c298c2812:1-103,d93dfbb8-66bb-11eb-9a1e-000c29fb00ac:1-8, server_id=2, event=1} for table test3.order_main 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=51441 --stop-position=51557 --verbose binlog.000001

 2021-06-16 16:26:46 ERROR [blc-centos7-01:3306] io.debezium.connector.mysql.BinlogReader:1178 - Error during binlog processing. Last offset stored = null, binlog reader near position = binlog.000001/51441

 2021-06-16 16:26:46 ERROR [blc-centos7-01:3306] io.debezium.connector.mysql.BinlogReader:219 - Failed due to error: Error processing binlog event

 org.apache.kafka.connect.errors.ConnectException: Encountered change event for table test3.order_main whose schema isn't known to this connector

at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:241) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:218) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:607) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1104) [flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:955) [flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:595) [flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:839) [flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]

Caused by: org.apache.kafka.connect.errors.ConnectException: Encountered change event for table test3.order_main whose schema isn't known to this connector

at io.debezium.connector.mysql.BinlogReader.informAboutUnknownTableIfRequired(BinlogReader.java:875) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at io.debezium.connector.mysql.BinlogReader.handleUpdateTableMetadata(BinlogReader.java:849) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:590) ~[flink-connector-mysql-cdc-1.3.0.jar:1.3.0]

... 5 more
















--

kingdomad