【无标题】Could not find a ‘KafkaClient‘ entry in the JAAS configuration. System property ‘java.security.

【无标题】Could not find a ‘KafkaClient‘ entry in the JAAS configuration. System property ‘java.security.,第1张

【无标题】Could not find a ‘KafkaClient‘ entry in the JAAS configuration. System property ‘java.security.

@关于本地启动kafka报登录方面的问题

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
	at org.apache.kafka.common.security.JaasContext.defaultContext(JaasContext.java:133)
	at org.apache.kafka.common.security.JaasContext.load(JaasContext.java:98)
	at org.apache.kafka.common.security.JaasContext.loadClientContext(JaasContext.java:84)
	at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:124)
	at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:67)
	at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:99)
	at org.apache.kafka.clients.producer.KafkaProducer.newSender(KafkaProducer.java:450)
	at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:421)
	... 2 more

**说我没有设置登录的系统变量**
本质是没有登录验证,需要在一个地方告诉kafka客户端我的登录账户密码

**解决方法**
添加启动配置文件,告诉kafka我的登录账户密码
![在这里插入图片描述](https://img-blog.csdnimg.cn/96bf17548dc84d77befdf5fae382ba8d.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd2VpeGluXzQ1OTYxMzAw,size_20,color_FFFFFF,t_70,g_se,x_16)
conf文件参照https://blog.csdn.net/qq_41858402/article/details/118941503
这个大佬的写法,而且这里面写得很详细,感谢大佬~
	


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5653728.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存