问题
EI611 with kafka connector latest throwing error :
org.apache.kafka.common.KafkaException: Exception while loading Zookeeper JAAS login context 'Client' . . . . Caused by: java.lang.SecurityException: java.io.IOException: C:\WSO2EI~1.1\bin..\repository\conf\identity\jaas.conf (No such file or directory)
This error was posted by someone else too : wso2 Inbound endpoint - Kafka consumer
Does anybody find the solution? Do you know how to fix?
回答1:
If you need to configure Kafka without security, the recommonded version is 0.8.1.1.
From Kafka version 0.9 onwards, they have introduced Kafka security mechanism with SSL and SASL, which will be configured via JAAS. So, when configuring Kafka with WSO2 Products (EI, DAS, CEP) you need to add this config file (jaas.conf) to /repository/conf/identity.
In this case, WSO2 product acts as the Kafka client and the configuration in the jaas.conf will be used to login to the kafka server. Please follow the Kafka security documentation [1] for configuring security for server and client.
Example content for jaas.conf file which is configured for SASL/ Plaintext.
KafkaServer {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="kafka"
password="kafka-secret"
user_kafka="kafka-secret"
user_ibm="ibm-secret";
};
KafkaClient {
org.apache.kafka.common.security.plain.PlainLoginModule required
username="kafka"
password="kafka-secret";
};
Please note that kafka 0.9 supports only SASL/Kerberos authentication. Please carefully follow the Kafka security documentation related to your Kafka version and configure it properly.
[1] http://kafka.apache.org/090/documentation.html#security_sasl
来源:https://stackoverflow.com/questions/46846546/wso2-ei611-kafka-connector-error-jaas-conf-not-found