zookeeper认证kafka失败

THEYUNG 发表于: 2021-04-29   最后更新时间: 2021-04-29 10:53:56   145 游览

报错:

2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:SaslServerCallbackHandler@93] - User 'test' not found in list of DIGEST-MD5 authenticateable users.
2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:SaslServerCallbackHandler@107] - No password found for user: null
2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@1043] - Client failed to SASL authenticate: javax.security.sasl.SaslException: DIGEST-MD5: cannot acquire password for test in realm : zk-sasl-md5
javax.security.sasl.SaslException: DIGEST-MD5: cannot acquire password for test in realm : zk-sasl-md5

zookeeper_jaas.conf

Server {
    org.apache.zookeeper.server.auth.DigestLoginModule required
    username="test"
    password="password";
};

kafka_server_jaas.conf

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


发表于 12天前

把错误日志复制出来吧,图片太小了,编辑一下。
日志是zk报的吗?

THEYUNG -> 半兽人 12天前
2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:SaslServerCallbackHandler@93] - User 'test' not found in list of DIGEST-MD5 authenticateable users.
2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:SaslServerCallbackHandler@107] - No password found for user: null
2021-04-29 10:38:53,122 [myid:1] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@1043] - Client failed to SASL authenticate: javax.security.sasl.SaslException: DIGEST-MD5: cannot acquire password for test in realm : zk-sasl-md5
javax.security.sasl.SaslException: DIGEST-MD5: cannot acquire password for test in realm : zk-sasl-md5
THEYUNG -> 半兽人 12天前

是zk报的

半兽人 -> THEYUNG 12天前

提供一下你的参考文档,我来复现你的问题。

THEYUNG -> 半兽人 12天前

不好意思 解决了 有个节点配错了 但现在出现另一个问题

[2021-04-29 14:26:16,372] ERROR [Controller id=2, targetBrokerId=1] Connection to node 1 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)
[2021-04-29 14:26:16,580] ERROR [Controller id=2, targetBrokerId=1] Connection to node 1 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)
[2021-04-29 14:26:17,388] ERROR [Controller id=2, targetBrokerId=3] Connection to node 3 failed authentication due to: Authentication failed: Invalid username or password (org.apache.kafka.clients.NetworkClient)
半兽人 -> THEYUNG 12天前

认证失败:账户或密码无效
如果是刚加配置期间,轮询启动产生的(有些节点安全策略还没加),可以忽视。

THEYUNG -> 半兽人 12天前

每次重启都会出现 而且只有一个节点这样 不一定是哪个节点 这个可以忽视吗

半兽人 -> THEYUNG 12天前

你还是逐个节点排查下吧,根据日志来看,它连了1和3,那说明它自己是2节点(如果只有3个节点的情况下)。

THEYUNG -> 半兽人 12天前

第三个启动的节点 启动之后 第一个启动的节点就会报这个错

THEYUNG -> 半兽人 12天前

而且生产者一直超时

THEYUNG -> 半兽人 12天前

kafka-logs中没有日志请问是怎么回事

找不到想要的答案?

我要提问
相关
提问