问题描述
我正在使用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 (将#修改为@)