在'/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf'中找不到名为“服务器"的JAAS配置节. [英] No JAAS configuration section named 'Server' was foundin '/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf'

查看:1058
本文介绍了在'/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf'中找不到名为“服务器"的JAAS配置节.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从kakfa_2.12-2.3.0中的包中运行zookeeper时,出现以下错误

when i run the zookeeper from the package in the kakfa_2.12-2.3.0 i am getting the following error

$ export KAFKA_OPTS="-Djava.security.auth.login.config=/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf"
    $ ./bin/zookeeper-server-start.sh  config/zookeeper.properties

zookeeper_jaas.conf

KafkaServer {
   org.apache.kafka.common.security.plain.PlainLoginModule required
   username="admin"
   password="admin-secret"
   user_admin="admin-secret";
};

zookeeper.properties文件

server=localhost:9092
#server=localhost:2888:3888
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="ibm" password="ibm-secret";

security.protocol=SASL_SSL
sasl.mechanism=PLAIN
ssl.truststore.location=**strong text**/kafka/apache-zookeeper-3.5.5-bin/zookeeperkeys/client.truststore.jks
ssl.truststore.password=test1234

 authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider 
 jaasLoginRenew=3600000 
 requireClientAuthScheme=sasl 

任何人都可以提出原因

推荐答案

您似乎已经将一堆Kafka SASL配置混入了Zookeeper配置文件中. Zookeeper和Kafka都具有不同的SASL支持,因此无法正常工作.

You seem to have mixed up a bunch of Kafka SASL configuration into your Zookeeper configuration files. Both Zookeeper and Kafka have different SASL support so it's not going to work.

我猜您想在Kafka和Zookeeper之间启用SASL身份验证.在这种情况下,您需要遵循Zookeeper服务器-客户端指南: https://cwiki.apache.org/confluence/display/ZOOKEEPER/Client-Server+mutual+authentication

I'm guessing you want to enable SASL authentication between Kafka and Zookeeper. In that case you need to follow the Zookeeper Server-Client guide: https://cwiki.apache.org/confluence/display/ZOOKEEPER/Client-Server+mutual+authentication

Zookeeper不支持SASL Plain,但是DigestMD5非常相似.在这种情况下,您的jaas.conf文件应如下所示:

Zookeeper does not support SASL Plain, but DigestMD5 is pretty similar. In that case your jaas.conf file should look like:

Server {
   org.apache.zookeeper.server.auth.DigestLoginModule required
   user_super="adminsecret"
   user_bob="bobsecret";
};

然后,您需要配置您的Kafka代理以使用SASL连接到Zookeeper.您可以使用另一个jaas.conf文件(这次将其加载到Kafka中)进行操作:

Then you need to configure your Kafka brokers to connect to Zookeeper with SASL. You can do that using another jaas.conf file (this time loading it in Kafka):

Client {
   org.apache.zookeeper.server.auth.DigestLoginModule required
   username="bob"
   password="bobsecret";
};


注意:您还可以在Zookeeper服务器之间启用SASL.这样做,请遵循服务器-服务器指南: https://cwiki.apache.org/confluence/display/ZOOKEEPER/Server-Server+mutual+authentication

这篇关于在'/kafka/kafka_2.12-2.3.0/config/zookeeper_jaas.conf'中找不到名为“服务器"的JAAS配置节.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆