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

我正在尝试在启用 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": "******" } }'



蝴蝶刀刀
浏览 144回答 2
2回答

翻翻过去那场雪

您需要在注册连接器时在 JSON 正文中添加 SSL 属性:database.history.producer.security.protocol=SSLdatabase.history.producer.ssl.keystore.location=/var/private/ssl/kafka.server.keystore.jksdatabase.history.producer.ssl.keystore.password=test1234database.history.producer.ssl.truststore.location=/var/private/ssl/kafka.server.truststore.jksdatabase.history.producer.ssl.truststore.password=test1234database.history.producer.ssl.key.password=test1234database.history.consumer.security.protocol=SSLdatabase.history.consumer.ssl.keystore.location=/var/private/ssl/kafka.server.keystore.jksdatabase.history.consumer.ssl.keystore.password=test1234database.history.consumer.ssl.truststore.location=/var/private/ssl/kafka.server.truststore.jksdatabase.history.consumer.ssl.truststore.password=test1234database.history.consumer.ssl.key.password=test1234

慕哥6287543

此错误表明 jaas 配置对您的 kafka 客户端不可见。要解决此问题,您可以导出以下变量:export&nbsp;KAFKA_OPTS="-Djava.security.auth.login.config=path/to/jaas.conf"
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java