So we have the following scenario
Kafka broker (Kerberized) goes into the state of unresponsiveness while 
KafkaProducer issued a send() call.  Regardless of the reasons why the broker 
ends up in this state my question is really about KafkaProducer. It continues 
to retry (see stack trace below) even after close() call was issued.

2016-04-21 12:55:45,668 WARN [kafka-producer-network-thread | 
NiFi-88acbefb-3d89-4be6-bb9e-d02e776ff459] 
org.apache.kafka.common.network.Selector Error in I/O with connection to 
my-cluster-3-1.foobar/132.221.14.63
java.io.IOException: Unable to authenticate using SASL 
javax.security.sasl.SaslException: An error: 
(java.security.PrivilegedActionException: javax.security.sasl.SaslException: 
GSS initiate failed [Caused by GSSException: No valid credentials provided 
(Mechanism level: Failed to find any Kerberos tgt)]) occurred when evaluating 
Kafka Brokers  received SASL token. Kafka Client will go to AUTH_FAILED state.
at 
org.apache.kafka.common.network.SaslClientAuthenticator.authenticate(SaslClientAuthenticator.java:172)
 ~[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at org.apache.kafka.common.network.Channel.connect(Channel.java:71) 
~[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at org.apache.kafka.common.network.Selector.poll(Selector.java:326) 
~[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:221) 
[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:209) 
[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:127) 
[kafka-clients-0.8.2.2.3.2.0-2950.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_71]


So, my question; Is there a way to stop KafkaProducer in such was that those 
re-try threads are interrupted. Basically it appears that aside from killing 
the JVM the producer runs in, there is no other way to do that or is there?


Thank you
Oleg

Reply via email to