NullPointerException in broker on notification of ZK session end

2014-04-02 Thread Clark Breyman
I'm seeing a lot of this in my logs on a non-controller broker:

2014-04-02 15:42:23,078] ERROR Error handling event ZkEvent[New session
event sent to
kafka.controller.KafkaController$SessionExpirationListener@204a18ac]
(org.I0Itec.zkclient.ZkEventThread)
java.lang.NullPointerException
at
kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply$mcV$sp(KafkaController.scala:340)
at
kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
at
kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at
kafka.controller.KafkaController.onControllerResignation(KafkaController.scala:337)
at
kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply$mcZ$sp(KafkaController.scala:1068)
at
kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
at
kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
at kafka.utils.Utils$.inLock(Utils.scala:538)
at
kafka.controller.KafkaController$SessionExpirationListener.handleNewSession(KafkaController.scala:1067)
at org.I0Itec.zkclient.ZkClient$4.run(ZkClient.java:472)
at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)


Is it associated with KAFKA-1310 or is it something else?

It seems to be coming at the beginning of onControllerResignation, so non
of the other shutdowns get triggered.


Re: NullPointerException in broker on notification of ZK session end

2014-04-02 Thread Clark Breyman
Hey Tim. Small world :).

Kafka 0.8.1_2.10




On Wed, Apr 2, 2014 at 3:54 PM, Timothy Chen tnac...@gmail.com wrote:

 Hi Clark,

 What version of Kafka are you running this from?

 Thanks,

 Tim


 On Wed, Apr 2, 2014 at 3:49 PM, Clark Breyman cl...@breyman.com wrote:

  I'm seeing a lot of this in my logs on a non-controller broker:
 
  2014-04-02 15:42:23,078] ERROR Error handling event ZkEvent[New session
  event sent to
  kafka.controller.KafkaController$SessionExpirationListener@204a18ac]
  (org.I0Itec.zkclient.ZkEventThread)
  java.lang.NullPointerException
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply$mcV$sp(KafkaController.scala:340)
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
  at kafka.utils.Utils$.inLock(Utils.scala:538)
  at
 
 
 kafka.controller.KafkaController.onControllerResignation(KafkaController.scala:337)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply$mcZ$sp(KafkaController.scala:1068)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
  at kafka.utils.Utils$.inLock(Utils.scala:538)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener.handleNewSession(KafkaController.scala:1067)
  at org.I0Itec.zkclient.ZkClient$4.run(ZkClient.java:472)
  at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
 
 
  Is it associated with KAFKA-1310 or is it something else?
 
  It seems to be coming at the beginning of onControllerResignation, so non
  of the other shutdowns get triggered.
 



Re: NullPointerException in broker on notification of ZK session end

2014-04-02 Thread Timothy Chen
Hey Clark,

Small world indeed :)

I don't believe it's associated with KAFKA-1310, and I actually
already have a fix in the 0.8.1 branch and trunk. Please try it and it
will be in our 0.8.1.1 release.

I can actually repro the problem you're seeing, seems like we're
calling onControllerResignation assuming it's the controller while the
broker might be just re-establishing zookeeper session.

I'll file a jira and fix this.

Tim



On Wed, Apr 2, 2014 at 4:00 PM, Clark Breyman cl...@breyman.com wrote:
 Hey Tim. Small world :).

 Kafka 0.8.1_2.10




 On Wed, Apr 2, 2014 at 3:54 PM, Timothy Chen tnac...@gmail.com wrote:

 Hi Clark,

 What version of Kafka are you running this from?

 Thanks,

 Tim


 On Wed, Apr 2, 2014 at 3:49 PM, Clark Breyman cl...@breyman.com wrote:

  I'm seeing a lot of this in my logs on a non-controller broker:
 
  2014-04-02 15:42:23,078] ERROR Error handling event ZkEvent[New session
  event sent to
  kafka.controller.KafkaController$SessionExpirationListener@204a18ac]
  (org.I0Itec.zkclient.ZkEventThread)
  java.lang.NullPointerException
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply$mcV$sp(KafkaController.scala:340)
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
  at
 
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
  at kafka.utils.Utils$.inLock(Utils.scala:538)
  at
 
 
 kafka.controller.KafkaController.onControllerResignation(KafkaController.scala:337)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply$mcZ$sp(KafkaController.scala:1068)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
  at kafka.utils.Utils$.inLock(Utils.scala:538)
  at
 
 
 kafka.controller.KafkaController$SessionExpirationListener.handleNewSession(KafkaController.scala:1067)
  at org.I0Itec.zkclient.ZkClient$4.run(ZkClient.java:472)
  at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
 
 
  Is it associated with KAFKA-1310 or is it something else?
 
  It seems to be coming at the beginning of onControllerResignation, so non
  of the other shutdowns get triggered.
 



Re: NullPointerException in broker on notification of ZK session end

2014-04-02 Thread Clark Breyman
Thanks Tim.


On Wed, Apr 2, 2014 at 5:18 PM, Timothy Chen tnac...@gmail.com wrote:

 Hey Clark,

 Small world indeed :)

 I don't believe it's associated with KAFKA-1310, and I actually
 already have a fix in the 0.8.1 branch and trunk. Please try it and it
 will be in our 0.8.1.1 release.

 I can actually repro the problem you're seeing, seems like we're
 calling onControllerResignation assuming it's the controller while the
 broker might be just re-establishing zookeeper session.

 I'll file a jira and fix this.

 Tim



 On Wed, Apr 2, 2014 at 4:00 PM, Clark Breyman cl...@breyman.com wrote:
  Hey Tim. Small world :).
 
  Kafka 0.8.1_2.10
 
 
 
 
  On Wed, Apr 2, 2014 at 3:54 PM, Timothy Chen tnac...@gmail.com wrote:
 
  Hi Clark,
 
  What version of Kafka are you running this from?
 
  Thanks,
 
  Tim
 
 
  On Wed, Apr 2, 2014 at 3:49 PM, Clark Breyman cl...@breyman.com
 wrote:
 
   I'm seeing a lot of this in my logs on a non-controller broker:
  
   2014-04-02 15:42:23,078] ERROR Error handling event ZkEvent[New
 session
   event sent to
   kafka.controller.KafkaController$SessionExpirationListener@204a18ac]
   (org.I0Itec.zkclient.ZkEventThread)
   java.lang.NullPointerException
   at
  
  
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply$mcV$sp(KafkaController.scala:340)
   at
  
  
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
   at
  
  
 
 kafka.controller.KafkaController$anonfun$onControllerResignation$1.apply(KafkaController.scala:337)
   at kafka.utils.Utils$.inLock(Utils.scala:538)
   at
  
  
 
 kafka.controller.KafkaController.onControllerResignation(KafkaController.scala:337)
   at
  
  
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply$mcZ$sp(KafkaController.scala:1068)
   at
  
  
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
   at
  
  
 
 kafka.controller.KafkaController$SessionExpirationListener$anonfun$handleNewSession$1.apply(KafkaController.scala:1067)
   at kafka.utils.Utils$.inLock(Utils.scala:538)
   at
  
  
 
 kafka.controller.KafkaController$SessionExpirationListener.handleNewSession(KafkaController.scala:1067)
   at org.I0Itec.zkclient.ZkClient$4.run(ZkClient.java:472)
   at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71)
  
  
   Is it associated with KAFKA-1310 or is it something else?
  
   It seems to be coming at the beginning of onControllerResignation, so
 non
   of the other shutdowns get triggered.