[ https://issues.apache.org/jira/browse/KAFKA-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097674#comment-14097674 ]
Joel Koshy commented on KAFKA-1577: ----------------------------------- [~sriharsha] I tried reproducing this again and as I mentioned it is a corner case so it is hard to catch. Anyway, here is the root cause: This only happens during shutdown. We close out existing selection keys as the requests are completed. When closing the key, we close the associated channel (which decrements connection count) and then cancel the key. Although the key is canceled, it will be removed from the selector only on the next select. The shutdown process proceeds to close all the keys of the selector (i.e., socket server's closeAll). However, the above key (and associated closed channel) may still be there which is why we see this exception. So I think we can swallow this error if we are shutting down and place a comment in the code on why we are swallowing it. > Exception in ConnectionQuotas while shutting down > ------------------------------------------------- > > Key: KAFKA-1577 > URL: https://issues.apache.org/jira/browse/KAFKA-1577 > Project: Kafka > Issue Type: Bug > Components: core > Reporter: Joel Koshy > Assignee: Sriharsha Chintalapani > Labels: newbie > Attachments: KAFKA-1577.patch > > > {code} > [2014-08-07 19:38:08,228] ERROR Uncaught exception in thread > 'kafka-network-thread-9092-0': (kafka.utils.Utils$) > java.util.NoSuchElementException: None.get > at scala.None$.get(Option.scala:185) > at scala.None$.get(Option.scala:183) > at kafka.network.ConnectionQuotas.dec(SocketServer.scala:471) > at kafka.network.AbstractServerThread.close(SocketServer.scala:158) > at kafka.network.AbstractServerThread.close(SocketServer.scala:150) > at kafka.network.AbstractServerThread.closeAll(SocketServer.scala:171) > at kafka.network.Processor.run(SocketServer.scala:338) > at java.lang.Thread.run(Thread.java:662) > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)