The NPE suggests that the zookeeper client that the rebalancer was using was null. This can happen only if the rebalancer is triggered during shutdown or before startup. Shutdown seems more likely and this could be a bug. I will need to take a look at your client code to see why the IllegalStateException is happening. Please can you file a bug and attach the logs as well as the testcase that reproduces this ?
Thanks, Neha On Wed, Jul 18, 2012 at 7:44 PM, <zlai_2...@sina.com> wrote: > Thanks Neha,There is another exception, but it happened just one time. It > like below: > java.lang.NullPointerException at > kafka.utils.ZkUtils$.getChildrenParentMayNotExist(ZkUtils.scala:181) > at kafka.utils.ZkUtils$.getCluster(ZkUtils.scala:202) at > kafka.consumer.ZookeeperConsumerConnector$ZKRebalancerListener$$anonfun$syncedRebalance$1.apply$mcVI$sp(ZookeeperConsumerConnector.scala:447) > at > scala.collection.immutable.Range$ByOne$class.foreach$mVc$sp(Range.scala:282) > at > scala.collection.immutable.Range$$anon$2.foreach$mVc$sp(Range.scala:265) > at > kafka.consumer.ZookeeperConsumerConnector$ZKRebalancerListener.syncedRebalance(ZookeeperConsumerConnector.scala:444) > at > kafka.consumer.ZookeeperConsumerConnector.kafka$consumer$ZookeeperConsumerConnector$$reinitializeConsumer(ZookeeperConsumerConnector.scala:733) > at > kafka.consumer.ZookeeperConsumerConnector.consume(ZookeeperConsumerConnector.scala:207) > at > kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:77) > at > kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:91) > at > bfd.kafkaconsumerclient.ConsumerInstance.Init(ConsumerInstance.java:167) > at > bfd.kafkaconsumerclient.ConsumerInstance.getArray(ConsumerInstance.java:275) > > But the exception "java.lang.IllegalStateException: Iterator is in failed > state" happened frequently. And there are a lot of this exceptions in > short time. I use client to consume some topics that are not exist on zk. > Does that has relation to the exception?Thanks. > ----- Original Message ----- > From: Neha Narkhede <neha.narkh...@gmail.com> > To: kafka-users@incubator.apache.org, zlai_2...@sina.com > Subject: Re: an exception in the logfile of consumer client > Date: 2012-07-19 01:09 > > I suspect the consumer logs should have some other exception too. Could > you send around the entire consumer log as well as the consumer code > snippet ? Also, do you have a test case ? > > Thanks, > Neha > > > On Wed, Jul 18, 2012 at 4:27 AM, <zlai_2...@sina.com> wrote: > > Hi all, > > I use the kafka-0.7.1. But I find an exception in the logfile of > consumer client. I want to know how does it happen? How to solve it? > Thanks.The exception is like: > > java.lang.IllegalStateException: Iterator is in failed state > > at kafka.utils.IteratorTemplate.hasNext(IteratorTemplate.scala:47) > > at > bfd.kafkaconsumerclient.ConsumerInstance.getArray(ConsumerInstance.java:273) > > at > bfd.kafkaconsumerclient.KafkaConsumerClientManagerI.getArray(KafkaConsumerClientManagerI.java:279) > > at > bfd.kafkaconsumerclient._KafkaConsumerClientManagerDisp.___getArray(_KafkaConsumerClientManagerDisp.java:324) > > at > bfd.kafkaconsumerclient._KafkaConsumerClientManagerDisp.__dispatch(_KafkaConsumerClientManagerDisp.java:594) > > at IceInternal.Incoming.invoke(Incoming.java:159) > > at Ice.ConnectionI.invokeAll(ConnectionI.java:2037) > > at Ice.ConnectionI.message(ConnectionI.java:972) > > at IceInternal.ThreadPool.run(ThreadPool.java:577) > > at IceInternal.ThreadPool.access$100(ThreadPool.java:12) > > at > IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971) > > >