簡體   English   中英

MySQL Debezium Kafka:此連接器不知道架構

[英]MySQL Debezium Kafka : schema isn't known to this connector

我用“table.whitelist”中的一個表啟動了 MySQL Debezium Kafka 連接器(版本:0.9.2.Final ),它工作正常。 在白名單中添加另一個表並重新啟動連接器時,我收到以下錯誤。

org.apache.kafka.connect.errors.ConnectException: Encountered change event for table paperclip.iltwhose schema isn't known to this connector
    at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)
    at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:208)
    at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:477)
    at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1095)
    at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:943)
    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:580)
    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:825)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.kafka.connect.errors.ConnectException: Encountered change event for table paperclip.iltwhose schema isn't known to this connector
    at io.debezium.connector.mysql.BinlogReader.informAboutUnknownTableIfRequired(BinlogReader.java:727)
    at io.debezium.connector.mysql.BinlogReader.handleUpdateTableMetadata(BinlogReader.java:702)
    at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:461)
    ... 5 more

請找到我使用的以下配置。 我希望通過這個設置( “database.history.store.only.monitored.tables.ddl”:“false” ),它應該可以工作。

我該如何解決這個案子?

{
    "name": "Mysql-rnd-engagex",
    "connector.class": "io.debezium.connector.mysql.MySqlConnector",
    "tasks.max": "3",
    "key.converter": "org.apache.kafka.connect.json.JsonConverter",
    "value.converter": "org.apache.kafka.connect.json.JsonConverter",
    "errors.log.enable": "true",
    "errors.log.include.messages": "true",
    "database.hostname": "devmysql.xxxx.net",
    "database.port": "3306",
    "database.user": "xxxxxx",
    "database.password": "xxxxx",
    "database.server.name": "rnd_engagex_cdc",
    "database.history.kafka.bootstrap.servers": "xxxxxx.aivencloud.com:xxxx",
    "database.history.kafka.topic": "rnd_engagex_dbhistory",
    "database.history.skip.unparseable.ddl": "false",
    "database.history.store.only.monitored.tables.ddl": "false",
    "include.schema.changes": "false",
    "include.query": "false",
    "table.ignore.builtin": "true",
    "database.whitelist": "paperclip",
    "table.whitelist": "paperclip.elearning",    //added new table : "paperclip.elearning,paperclip.ilt"
    "column.blacklist": "paperclip.elearning.description",
    "gtid.source.filter.dml.events": "true",
    "tombstones.on.delete": "true",
    "connect.keep.alive": "true",
    "snapshot.minimal.locks": "true",
    "database.history.producer.ssl.truststore.location": "/xxxx/yyyy/keys/public.truststore.jks",
    "value.converter.schemas.enable": "false",
    "database.history.consumer.ssl.truststore.location": "/xxxx/yyyy/keys/public.truststore.jks",
    "database.history.producer.ssl.truststore.password": "password",
    "database.history.producer.ssl.keystore.location": "/xxxx/yyyy/keys/public.keystore.p12",
    "database.history.consumer.ssl.truststore.password": "password",
    "database.history.consumer.ssl.keystore.location": "/xxxx/yyyy/keys/public.keystore.p12",
    "database.history.producer.ssl.keystore.type": "PKCS12",
    "database.history.producer.ssl.keystore.password": "ppppppppp",
    "database.history.consumer.ssl.key.password": "ppppppppp",
    "database.history.producer.security.protocol": "SSL",
    "database.history.consumer.ssl.keystore.type": "PKCS12",
    "database.history.consumer.ssl.keystore.password": "ppppppppp",
    "database.history.producer.ssl.key.password": "ppppppppp",
    "database.history.consumer.security.protocol": "SSL",
    "key.converter.schemas.enable": "false"
}

您需要在創建連接器時添加屬性“snapshot.new.tables”:“parallel”,然后只有您才能在稍后階段將更多表列入白名單。 這在文檔中沒有給出,因為該功能在 0.9.x 中作為測試版提供

就我而言,我已經設置

"snapshot.mode" : "initial",

這就是解決方案。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM