运行 Spark Streaming出现”Could not find KafkaClient entry in the JAAS configuration”
在使用FusionInsight HD大数据平台,用Spark Streaming来处理数据接入,kafka作为消费者,运行程序时出现”Could not find KafkaClient entry in the JAAS configuration”,当时怀疑是FusionInsight HD 的客户端相关配置有问题。
采用替换法思维,在另一台已经验证 FusionInsight HD 的客户端没问题的服务上运行,果然这个问题没做出现,仔细对比了这2台服务FusionInsight HD 的客户端 的配置,发现在spark配置文件(hd安装目录/Spark2x/spark/conf/Jaas.conf)要修改为下面的配置:
KafkaClient{
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
principal="大数据平台账号"
useTicketCache=false
keyTab="user.keytab的路径"
storeKey=true;
};