赞
踩
在项目中使用SASL_PLAINTEXT协议配置了用户名密码,启动connect的时候,一直报disconnect
启动的时候一直报错授权失败,或者是disconnected
需要在connect的配置文件connect-distributed.properties和插件的配置文件里同时添加相关的配置项
Kafka安装路径/kafka/config/connect-distributed.properties
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
plugin.path=# 1.配置Connect workers去使用SASL/PLAIN
sasl.mechanism=PLAIN
# Configure SASL_SSL if SSL encryption is enabled, otherwise configure SASL_PLAINTEXT
security.protocol=SASL_SSL# 2.配置JAAS参数,Connect的生产者和消费者去连接Kafka
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="connect" \
password="connect-secret";
# 3.Source连接器配置相同的参数,加上producer前缀
producer.sasl.mechanism=PLAIN
# Configure SASL_SSL if SSL encryption is enabled, otherwise configure SASL_PLAINTEXT
producer.security.protocol=SASL_SSL
producer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="connect" \
password="connect-secret";# 4.Sink连接器配置相同的参数,加上consumer前缀
consumer.sasl.mechanism=PLAIN
# Configure SASL_SSL if SSL encryption is enabled, otherwise configure SASL_PLAINTEXT
consumer.security.protocol=SASL_SSL
consumer.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="connect" \
password="connect-secret";
sqlserver-cdc-source.json
{
"name": "sqlserver-cdc-source",
"config": {
"connector.class" : "io.debezium.connector.sqlserver.SqlServerConnector",
"tasks.max" : "1",
"database.server.name" : "db",
"database.hostname" : "192.168.1.1&
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。