简体   繁体   English

如何在创建 debezium mongodb kafka 连接器时通过 MongoDB tls 证书?

[英]how to pass MongoDB tls certificates while creating debezium mongodb kafka connector?

We have MongoDB cluster with three replicas.我们有具有三个副本的 MongoDB 集群。 I have enabled preferred TLS and authentication type as MongoDB-X509.我已将首选 TLS 和身份验证类型启用为 MongoDB-X509。

We have three broker strimzi kafka cluster and connect cluster with all required plugins (ie mongoDB provided by debezium) up and running.我们有三个代理 srimzi kafka 集群,并将集群与所有必需的插件(即 debezium 提供的 mongoDB)连接起来并运行。

Now I tried to create mongodb connector with following json:-现在我尝试使用以下 json 创建 mongodb 连接器:-

{
  "name": "mongo-connector",
  "config": {
      "connector.class": "io.debezium.connector.mongodb.MongoDbConnector", 
      "mongodb.hosts": "rs0/192.168.99.100:27017", 
      "mongodb.name": "fullfillment", 
      "collection.include.list": "inventory[.]*",
      "mongodb.ssl.enabled": "true",
      "mongodb.ssl.invalid.hostname.allowed": "true" 
     }
}

Then have executed following command to create connector:-然后执行以下命令来创建连接器:-

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://192.168.99.101:8083/connectors/ -d @mongo.json

Then connectors got created, but when I am checking its status it is showing "as Failed" and connectors are not in Running state.然后创建了连接器,但是当我检查它的状态时,它显示“失败”并且连接器不在运行 state 中。

I was following debezium official docs for MongoDB connector, but not sure how to pass tlsCAfile and tlsCertificateKeyFile which is required for Mongo TLS connection.我正在关注 MongoDB 连接器的 debezium 官方文档,但不确定如何传递 Mongo TLS 连接所需的 tlsCAfile 和 tlsCertificateKeyFile。

As for Strimzi, you can use the external configuration to mount Secrets or Config Maps into the Strimzi Kafka Connect deployment: https://strimzi.io/docs/operators/latest/full/using.html#type-ExternalConfiguration-reference .至于 Strimzi,您可以使用外部配置将 Secrets 或 Config Maps 挂载到 Strimzi Kafka Connect 部署中: https://strimzi.io/docs/operators/latest/full/using.html#type-ExternalConfiguration-reference Once it is loaded into the Pods, you can either just refer to it using the file path, or you can use the Kafka configuration providers to load the data into the configuration options.一旦它被加载到 Pods 中,你既可以使用文件路径来引用它,也可以使用 Kafka 配置提供程序将数据加载到配置选项中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Debezium Kafka连接器mongodb - Debezium Kafka connector mongodb Debezium mongodb kafka 连接器没有像 mongodb 那样在主题中产生一些记录 - Debezium mongodb kafka connector not producing some of records in topic as it is in mongodb 我们如何从具有debezium kafka连接器的副本集中的辅助mongodb节点中截取oplog? - How could we tail oplog from a secondary mongodb node in a replica set with debezium kafka connector? 如何使用 Debezium MongoDB 源连接器将 JSON 值转换为 Kafka 消息密钥? - How to transform JSON value to Kafka message key with Debezium MongoDB Source Connector? 如何在 Kafka 中运行 mongodb 连接器? - How to run mongodb connector in Kafka? 在远程 MSK kafka 集群上使用 kafka 连接 mongoDB debezium 源连接器 - use kafka connect mongoDB debezium souce connector on a remote MSK kafka cluster 如何重命名 debezium mongodb 连接器发件箱消息的 id 标头 - How to rename the id header of a debezium mongodb connector outbox message kafka mongodb 写入 mongodb 时接收器连接器出现问题 - kafka mongodb sink connector issue while writing to mongodb Mongodb 到 Kafka 连接器 - Mongodb to Kafka Connector Debezium MongoDB 连接器错误:org.apache.kafka.connect.errors.ConnectException:错误处理程序中超出容差 - Debezium MongoDB Connector Error: org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM