在试图将kafkacat与消息集线器一起使用时,我使用了以下方法:
kafkacat -X client.id=xxxxx \
-X sasl.jaas.config='org.apache.kafka.common.security.plain.PlainLoginModule required username="xxxx" password="xxxx";' \
-X security.protocol=SASL_SSL \
-X sasl.mechanism=PLAIN \
-X ssl.protocol=TLSv1.2 \
-X ssl.enabled.protocols=TLSv1.2 \
-X ssl.truststore.type=JKS \
-X ssl.endpoint.identification.algorithm=HTTPS -b broker:port -C -t topic并得到以下错误:
% ERROR: Java JAAS configuration is not supported, see https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka for more information.如何使用提供的凭据使用kerberos来创建正确的键,然后使用这些键来使用某个主题?
发布于 2018-08-30 08:28:06
不能在kafkacat中使用Java参数名。
您需要使用库卡夫卡配置名称代替。例如,下面将运行一个使用者:
kafkacat -X "security.protocol=sasl_ssl" -X 'sasl.mechanisms=PLAIN' \
-X 'sasl.username=token' -X "sasl.password=<APIKEY>" \
-X "ssl.ca.location=<CERTS_PATH>" -b <BOOTSTRAP_SERVERS> -C -t <TOPIC>示例中指定的配置对消息集线器很好。
<CERTS_PATH>取决于您的操作系统:
/etc/ssl/cert.pem/Ubuntu/IBM Cloud: /etc/ssl/certs//etc/pki/tls/cert.pemhttps://stackoverflow.com/questions/52086933
复制相似问题