KAFKA经纪人SASL_SSL普通身份验证失败:无效的用户名或密码

问题描述 投票:0回答:1
我还创建了以下JAAS文件:

zookeeper_jaas.conf

Server { org.apache.zookeeper.server.auth.DigestLoginModule required username="admin" password="admin_password" user_admin="admin_password"; }; Client { org.apache.zookeeper.server.auth.DigestLoginModule required username="admin" password="admin_password"; };

kafka_server_jaas.conf

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

Client {
  org.apache.kafka.common.security.plain.PlainLoginModule required
  username="admin"
  password="admin_password";
};

当我启动容器时,kafka代理在日志中出现以下错误:

ERROR [Controller id=1, targetBrokerId=1] Connection to node 1 (kafka/192.168.160.3:9093) failed authenticati on due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient) [2025-01-17 13:45:50,896] WARN [RequestSendThread controllerId=1] Controller 1's connection to broker kafka:9093 (id: 1 rack: null) was unsuccessful (kafka.controller.RequestSendThread) org.apache.kafka.common.errors.SaslAuthenticationException: Authentication failed: Invalid username or password [2025-01-17 13:45:50,896] INFO [Controller id=1, targetBrokerId=1] Client requested connection close from node 1 (org.apache.kafka.clie nts.NetworkClient)
可能导致“无效的用户名或密码”错误,我该如何解决?
    

您在Zookeeper中所做的事情,对Kafkaserver Jaas做同样的事情:

username="admin" password="admin_password" user_admin="admin_password";

docker apache-kafka
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.