Error : incomplete database history topic

Hi
I am setting up kafka debezium connector for mysql but I am getting below error.

[2022-05-08 16:54:22,184] ERROR [kind-connector|task-0] Encountered change event 'Event{header=EventHeaderV4{timestamp=1652008196000, eventType=TABLE_MAP, serverId=1, headerLength=19, dataLength=211, nextPosition=989696319, flags=0}, data=TableMapEventData{tableId=113, database='cscart_db', table='cscart_orders', columnTypes=9, -2, 9, 3, 9, 9, -10, -10, -10, -10, -10, 15, -10, 3, -2, -4, -4, -4, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -2, 15, 15, 15, 15, 15, 15, 15, 15, 15, -2, 15, 15, 15, 15, 15, 15, 15, 9, -2, -2, 15, 3, 15, 9, 9, 3, 15, -2, -2, 3, columnMetadata=0, 65027, 0, 0, 0, 0, 524, 524, 524, 524, 524, 765, 524, 0, 65027, 2, 2, 2, 765, 96, 96, 765, 384, 384, 765, 765, 192, 96, 96, 65030, 96, 384, 384, 384, 765, 765, 192, 96, 96, 65030, 96, 384, 96, 384, 384, 96, 384, 0, 65027, 65030, 40, 0, 60, 0, 0, 0, 90, 65027, 65027, 0, columnNullability={4, 15, 16, 17}, eventMetadata=TableMapEventMetadata{signedness={0, 1, 2, 3, 4, 11, 15, 16, 17}, defaultCharset=33, charsetCollations=37: 63, columnCharsets=null, columnNames=null, setStrValues=null, enumStrValues=null, geometryTypes=null, simplePrimaryKeys=null, primaryKeysWithPrefix=null, enumAndSetDefaultCharset=null, enumAndSetColumnCharsets=null,visibility=null}}}' at offset {transaction_id=null, file=mysql-bin.000170, pos=989696000, gtids=86211f17-56be-11ec-aacf-0a434d1691d6:1-1270184, server_id=1, event=1} for table cscart_db.cscart_orders 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=989696089 --stop-position=989696319 --verbose mysql-bin.000170 (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:640)
[2022-05-08 16:54:22,185] ERROR [kind-connector|task-0] Error during binlog processing. Last offset stored = {transaction_id=null, file=mysql-bin.000170, pos=989696000, gtids=86211f17-56be-11ec-aacf-0a434d1691d6:1-1270184, server_id=1, event=1}, binlog reader near position = mysql-bin.000170/989696089 (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:1089)
[2022-05-08 16:54:22,186] ERROR [kind-connector|task-0] Producer failure (io.debezium.pipeline.ErrorHandler:35)
io.debezium.DebeziumException: Error processing binlog event
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:369)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$25(MySqlStreamingChangeEventSource.java:869)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1125)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:973)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
        at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.debezium.DebeziumException: Encountered change event for table cscart_db.cscart_orders whose schema isn't known to this connector
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.informAboutUnknownTableIfRequired(MySqlStreamingChangeEventSource.java:645)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.informAboutUnknownTableIfRequired(MySqlStreamingChangeEventSource.java:686)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleUpdateTableMetadata(MySqlStreamingChangeEventSource.java:623)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$13(MySqlStreamingChangeEventSource.java:840)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:349)
        ... 6 more
[2022-05-08 16:54:22,192] INFO [kind-connector|task-0] Error processing binlog event, and propagating to Kafka Connect so it stops this connector. Future binlog events read before connector is shutdown will be ignored. (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:374)
[2022-05-08 16:54:22,505] INFO [kind-connector|task-0] WorkerSourceTask{id=kind-connector-0} Either no records were produced by the task since the last offset commit, or every record has been filtered out by a transformation or dropped due to transformation or conversion errors. (org.apache.kafka.connect.runtime.WorkerSourceTask:484)
[2022-05-08 16:54:22,510] ERROR [kind-connector|task-0] WorkerSourceTask{id=kind-connector-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:195)
org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
        at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:369)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$25(MySqlStreamingChangeEventSource.java:869)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1125)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:973)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
        at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.debezium.DebeziumException: Error processing binlog event
        ... 7 more
Caused by: io.debezium.DebeziumException: Encountered change event for table cscart_db.cscart_orders whose schema isn't known to this connector
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.informAboutUnknownTableIfRequired(MySqlStreamingChangeEventSource.java:645)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.informAboutUnknownTableIfRequired(MySqlStreamingChangeEventSource.java:686)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleUpdateTableMetadata(MySqlStreamingChangeEventSource.java:623)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$13(MySqlStreamingChangeEventSource.java:840)
        at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:349)
        ... 6 more
[2022-05-08 16:54:22,511] INFO [kind-connector|task-0] Stopping down connector (io.debezium.connector.common.BaseSourceTask:238)

My connector config is as below

name=kind-connector
connector.class=io.debezium.connector.mysql.MySqlConnector
database.hostname=10.100.12.25
database.port=3306
database.user=debezium
database.password=dbz
database.server.id=1
database.allowPublicKeyRetrieval=true
database.server.name=mysql
database.include.list=cscart_db
table.include.list=cscart_db.cscart_orders
database.history.kafka.bootstrap.servers=localhost:9092
database.history.kafka.topic=dbhistory.ecomdb
include.schema.changes=true
tombstones.on.delete=false
snapshot.mode=initial
snapshot.new.tables=parallel
database.history=io.debezium.relational.history.MemoryDatabaseHistory

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.