1

根据 KIP-368 ( https://cwiki.apache.org/confluence/display/KAFKA/KIP-368 ),当 'connections.max.reauth.ms' 显式设置为正数时,服务器将断开任何 SASL不重新认证的连接。如果重新验证尝试失败,则代理将关闭连接,不支持重试。但是,当我的客户端无法重新进行身份验证时,它会进入无限循环的重试。

INFO [kafka-producer-network-thread | producer-1] org.apache.kafka.common.network.Selector: [Producer clientId=producer-1][Producer clientId=producer-1] Failed authentication with 10.4.252.249/10.4.252.249 (Authentication failed during authentication due to invalid credentials with SASL mechanism)
ERROR [kafka-producer-network-thread | producer-1] org.apache.kafka.clients.NetworkClient: [Producer clientId=producer-1] Connection to node 0 (10.4.252.249/10.4.252.249:9096) failed authentication due to: Authentication failed during authentication due to invalid credentials with SASL mechanism
INFO [kafka-producer-network-thread | producer-1] org.apache.kafka.common.network.Selector: [Producer clientId=producer-1][Producer clientId=producer-1] Failed authentication with 10.4.252.249/10.4.252.249 (Authentication failed during authentication due to invalid credentials with SASL mechanism)
ERROR [kafka-producer-network-thread | producer-1] org.apache.kafka.clients.NetworkClient: [Producer clientId=producer-1] Connection to node 0 (10.4.252.249/10.4.252.249:9096) failed authentication due to: Authentication failed during authentication due to invalid credentials with SASL mechanism

我希望客户端退出,以便我可以冒泡异常。有什么想法可以解决这个问题吗?

4

0 回答 0