为了账号安全,请及时绑定邮箱和手机立即绑定

无法在启用 SSL 的 Kafka 集群中注册 Debezium(Kafka-Connect)连接器

无法在启用 SSL 的 Kafka 集群中注册 Debezium(Kafka-Connect)连接器

蝴蝶刀刀 2023-03-31 16:38:24
我正在尝试在启用 SSL 的 Kafka 集群中注册一个 MySql Debezium 连接器。我为此目的使用的卷曲是:curl -k -X POST -H "Accept:application/json"  -H "Content-Type:application/json" https://<IPADDRESS>:8083/connectors/  -d '{ "name": "test-eds-extactor-profile", "config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "database.hostname": "<DBHOSTNAME>", "database.port": "3306", "database.user": "debezium", "database.password": "*****", "database.server.id": "1", "database.server.name": "MySQL-Database-Docker", "database.history.kafka.bootstrap.servers": "<IPADDRESS>:9094", "database.history.kafka.topic": "dbhistory.profile" , "include.schema.changes": "true", "table.whitelist": "test_eds_extraction_src_db_mock.profile", "database.history.producer.security.protocol": "SASL_PLAINTEXT", "database.history.producer.ssl.keystore.location": "path/to/server.jks", "database.history.producer.ssl.keystore.password": "******", "database.history.producer.ssl.truststore.location": "path/to//server.jks", "database.history.producer.ssl.truststore.password": "******", "database.history.producer.ssl.key.password": "******", "database.history.consumer.security.protocol": "SASL_PLAINTEXT", "database.history.consumer.ssl.keystore.location": "path/to/server.jks", "database.history.consumer.ssl.keystore.password": "******", "database.history.consumer.ssl.truststore.location": "path/to/server.jks", "database.history.consumer.ssl.truststore.password": "******", "database.history.consumer.ssl.key.password": "******" } }'
查看完整描述

2 回答

?
翻翻过去那场雪

TA贡献2065条经验 获得超13个赞

您需要在注册连接器时在 JSON 正文中添加 SSL 属性:


database.history.producer.security.protocol=SSL

database.history.producer.ssl.keystore.location=/var/private/ssl/kafka.server.keystore.jks

database.history.producer.ssl.keystore.password=test1234

database.history.producer.ssl.truststore.location=/var/private/ssl/kafka.server.truststore.jks

database.history.producer.ssl.truststore.password=test1234

database.history.producer.ssl.key.password=test1234

database.history.consumer.security.protocol=SSL

database.history.consumer.ssl.keystore.location=/var/private/ssl/kafka.server.keystore.jks

database.history.consumer.ssl.keystore.password=test1234

database.history.consumer.ssl.truststore.location=/var/private/ssl/kafka.server.truststore.jks

database.history.consumer.ssl.truststore.password=test1234

database.history.consumer.ssl.key.password=test1234


查看完整回答
反对 回复 2023-03-31
?
慕哥6287543

TA贡献1831条经验 获得超10个赞

此错误表明 jaas 配置对您的 kafka 客户端不可见。要解决此问题,您可以导出以下变量:

export KAFKA_OPTS="-Djava.security.auth.login.config=path/to/jaas.conf"


查看完整回答
反对 回复 2023-03-31
  • 2 回答
  • 0 关注
  • 142 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信