当前位置: 首页 > 知识库问答 >
问题:

MySQL Debezium Kafka:此连接器不知道模式

艾泉
2023-03-14

我用table.whitelist中的一个表启动了MySQL Debezium Kafka连接器(版本: 0.9.2。最终),它工作正常。当在白名单中添加另一个表并重新启动连接器时,我得到了下面的错误。

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"
}

共有2个答案

姬慎之
2023-03-14

就我而言,我已经

"snapshot.mode" : "initial",

这就是解决方案。

禹昆
2023-03-14

创建连接器时,您需要添加属性“snapshot.new.tables”:“并行”,这样只有您才能在后期将更多表列入白名单。这在留档中没有给出,因为该功能在0.9. x中作为测试版出现

 类似资料:
  • 根据IBM文档:清除策略指定在检测到陈旧连接或致命连接错误时如何清除连接。有效值为EntirePool和FailingConnectionOnly。 问题:服务器如何/何时知道连接已过时?它是否会尽快(立即)清洗池任何连接都会过时,或者按照收获时间发生? 假设收割时间为180秒。假设收割线程上次在下午3:05运行,连接在下午3:06失效,服务器是在下午3:06自己清除池,还是只在下午3:08清除池

  • 嗨,我已经在我的笔记本电脑上安装了来练习Oracle。我已连接到 HR 帐户。它已经连接了3天,但是在那之后,当我尝试通过SQL Developer连接时,我收到此错误:

  • 操作系统:Ubuntu 17.10 Python:2.7 Sublime文本3: 我正在尝试导入mysql.connector, 没有名为连接器的模块 不过,当我尝试导入mysql时。在pythonshell中,它可以工作。 早些时候它工作得很好,我刚刚升级了Ubuntu,不知何故mysql连接器不工作。 我尝试重新安装mysql连接器使用pip和git两者。 还是不走运。 请帮忙!

  • 检查下面的配置。如何配置才能使其发挥作用?

  • 我有一个关于使用无效证书通过https测试网站的问题。你能帮忙吗?我正在临时服务器上测试一个网站。它需要https,并且使用了无效的证书,该证书属于生产服务器。因此,当我访问该网站时,FireFox会显示“此连接不受信任页面”。我已经设法让firefox跳过页面;但是,如果我不使用Selenium(Python绑定)运行它,它将再次显示“Untrusted”页面。所以,我做了更多的研究,发现: h

  • 我应该在哪里打开和关闭到存储库的连接?在文章“不要重复DAO”中写道: DAO不负责处理事务、会话或连接。这些都是在DAO之外处理的,以实现灵活性。 但有些人建议我将对象注入DAO类,并处理DAO方法内部的所有连接。。。i、 e.每个CRUD操作都应打开和关闭与存储库的连接。