Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security Kafka到zookeeper摘要-MD5身份验证错误_Security_Apache Kafka_Apache Zookeeper_Hortonworks Data Platform_Sasl - Fatal编程技术网

Security Kafka到zookeeper摘要-MD5身份验证错误

Security Kafka到zookeeper摘要-MD5身份验证错误,security,apache-kafka,apache-zookeeper,hortonworks-data-platform,sasl,Security,Apache Kafka,Apache Zookeeper,Hortonworks Data Platform,Sasl,我可以使用kafka broker和嵌入式zookeeper(由kafka提供)执行DIGEST-MD5身份验证,但在使用kafka broker和非嵌入式zookeeper(单独的zookeeper实例)执行DIGEST-MD5身份验证时,我收到了以下错误消息 请查找以下错误消息: [2018-11-05 19:44:21,536] ERROR SASL authentication failed using login context 'Client' with exception: {}

我可以使用kafka broker和嵌入式zookeeper(由kafka提供)执行DIGEST-MD5身份验证,但在使用kafka broker和非嵌入式zookeeper(单独的zookeeper实例)执行DIGEST-MD5身份验证时,我收到了以下错误消息

请查找以下错误消息:

[2018-11-05 19:44:21,536] ERROR SASL authentication failed using login context 'Client' with exception: {} (org.apache.zookeeper.client.ZooKeeperSaslClient)

javax.security.sasl.SaslException: Error in authenticating with a Zookeeper Quorum member: the quorum member's saslToken is null.

org.apache.zookeeper.KeeperException$AuthFailedException: KeeperErrorCode = AuthFailed for /consumers

您的jaas文件是什么样子的

对于Zookeeper群集,Zookeeper jaas文件中必须有三个部分: 服务器QuorumServerQuorumLearner

QuorumServerQuorumLearner部分用于相互验证zookeeper服务器。请参阅§DIGEST-MD5-based authentication中的配置示例

服务器部分用于验证kafka代理。它应该包含卡夫卡用户名和密码,格式如§Server Configuration/JAAS配置文件:DIGEST-MD5 authentication中所示

您的Kafka jaas文件应该有一个客户端部分,其中包含用户名和密码,如§Client Configuration/jaas Configuration file:DIGEST-MD5 authentication所示

最后,检查是否为zookeeper jaas文件使用了正确的环境变量:

SERVER_JVMFLAGS="-Djava.security.auth.login.config=/path/to/server/jaas/file.conf"

嵌入式zookeeper使用KAFKA_选项

您的jaas文件是什么样子的

对于Zookeeper群集,Zookeeper jaas文件中必须有三个部分: 服务器QuorumServerQuorumLearner

QuorumServerQuorumLearner部分用于相互验证zookeeper服务器。请参阅§DIGEST-MD5-based authentication中的配置示例

服务器部分用于验证kafka代理。它应该包含卡夫卡用户名和密码,格式如§Server Configuration/JAAS配置文件:DIGEST-MD5 authentication中所示

您的Kafka jaas文件应该有一个客户端部分,其中包含用户名和密码,如§Client Configuration/jaas Configuration file:DIGEST-MD5 authentication所示

最后,检查是否为zookeeper jaas文件使用了正确的环境变量:

SERVER_JVMFLAGS="-Djava.security.auth.login.config=/path/to/server/jaas/file.conf"

Embedded zookeeper使用KAFKA_OPTS

现在我已经启用了授权,并且在创建主题时得到了错误,即执行topic命令时出错:keeperrorcode=NoAuth for/config/topics/test error org.apache.zookeeper.KeeperException$NoAuthException:keeperrorcode=NoAuth for/config/topics/test看起来不错,您没有访问主题的权限,现在可以玩了。在使用KAFKA-acls.sh之前,您必须使用包含客户端部分的jaas文件导出KAFKA_OPTS=“-Djava.security.auth.login.config=admin_jaas.conf”。我做了同样的事情,然后它工作正常,如果我使用两个动物园管理员,那么我会遇到什么问题?除了您需要一个,它应该可以工作。好的,谢谢。根据文档,我使用3个节点完成了zookeeper群集,例如,一个zookeeper节点宕机,那么读写情况会发生什么?现在我启用了授权,并在创建主题时收到错误,即。,执行topic命令时出错:keeperrorcode=NoAuth for/config/topics/test Error org.apache.zookeeper.KeeperException$NoAuthException:keeperrorcode=NoAuth for/config/topics/test看起来不错,您没有访问主题的权限,现在可以玩了。在使用KAFKA-acls.sh之前,您必须使用包含客户端部分的jaas文件导出KAFKA_OPTS=“-Djava.security.auth.login.config=admin_jaas.conf”。我做了同样的事情,然后它工作正常,如果我使用两个动物园管理员,那么我会遇到什么问题?除了您需要一个,它应该可以工作。好的,谢谢。根据文档,我用3个节点完成了zookeeper集群,例如,一个zookeeper节点宕机,那么读写情况会发生什么?