如何解决使用JAAS的Flink Kafka Table API for python
我正在使用Flink 1.11.2版本的Python Table API通过SASL协议连接到Kafka Topic,但失败并出现以下错误。我在Flink Java版本中尝试了相同的属性,并且可以连接。有没有人遇到过这个问题,您如何解决?
Caused by: javax.security.auth.login.LoginException: unable to find LoginModule class: org.apache.kafka.common.security.plain.PlainLoginModule
设置:
kafka = Kafka()\
.version("universal") \
.topic("test_topic")\
.property("group.id","consumer_group")\
.property("security.protocol","SASL_PLAINTEXT")\
.property("sasl.mechanism","PLAIN")\
.property("bootstrap.servers","<remoteIP>:9093")\
.property("sasl.jaas.config","org.apache.kafka.common.security.plain.PlainLoginModule required username=\"user\" "
"password=\"abc\";")\
.start_from_latest()
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。