kafka表api

hfsqlsce  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(204)

我使用flink1.11.2版python table api连接到kafka主题,使用sasl协议,但是失败了,出现以下错误。我在FlinkJava版本中尝试了相同的属性,并且我能够连接。有人遇到过这个问题吗?你是如何解决的?

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()

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题