Hi everyone! I’ve tried connecting to confluent ka...
# troubleshooting
g
Hi everyone! I’ve tried connecting to confluent kafka cloud via pyflink and got error:
Copy code
Caused by: java.lang.IllegalArgumentException: Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set
Jar file: flink-sql-connector-kafka-1.17.1.jar https://repo1.maven.org/maven2/org/apache/flink/flink-sql-connector-kafka/1.17.1/ Kafka source
Copy code
KafkaSource.builder()
.set_bootstrap_servers(args.source_bootstrap_servers)
.set_topics(*args.source_topic.split(";"))
.set_group_id(args.source_group_id)
.set_starting_offsets(KafkaOffsetsInitializer.latest())
.set_value_only_deserializer(json_row_schema)

# config provided by confluent 
.set_property("security.protocol", "SASL_SSL")
.set_property("sasl.mechanism", "PLAIN")
.set_property("sasl.username", "XXX")
.set_property("sasl.password", "YYY")
.build()
I tried combinations like this:
Copy code
.set_property("sasl.jaas.config", "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"username\" password=\"password\";")
.set_property("sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"username\" password=\"password\";")
.set_property("sasl.jaas.config", "org.apache.flink.kafka.shaded.org.apache.kafka.common.security.plain.PlainLoginModule required username=\"token\" password=\"secret\";")
But got error like:
Copy code
No LoginModule found for <http://org.apache.XXX|org.apache.XXX>
Could you please help?
m
How have you added the connector to your cluster?