You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Prakash Gowri Shankor <pr...@gmail.com> on 2014/06/07 00:17:36 UTC

NoReplicaOnlineException with 0.8.1.1

Hi,

I am running Kafka 0.8.1.1 with one Zookeeper and one broker. I created a
partition 'test2' as below:

/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1
--partitions 3 --topic test2

I noticed this exception in the state-change.log. Why is this occuring ?
Should I be running more brokers if I have more than one partition ?

*Exception:*

kafka.common.NoReplicaOnlineException: No replica for partition [test2,2]
is alive. Live brokers are: [Set()], Assigned replicas are: [List(0)]

        at
kafka.controller.OfflinePartitionLeaderSelector.selectLeader(PartitionLeaderSelector.scala:61)

        at
kafka.controller.PartitionStateMachine.electLeaderForPartition(PartitionStateMachine.scala:336)

        at
kafka.controller.PartitionStateMachine.kafka$controller$PartitionStateMachine$$handleStateChange(PartitionStateMachine.scala:185)

        at
kafka.controller.PartitionStateMachine$$anonfun$triggerOnlinePartitionStateChange$3.apply(PartitionStateMachine.scala:99)

        at
kafka.controller.PartitionStateMachine$$anonfun$triggerOnlinePartitionStateChange$3.apply(PartitionStateMachine.scala:96)

        at
scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:743)

        at
scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)

        at
scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)

        at scala.collection.Iterator$class.foreach(Iterator.scala:772)

        at
scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)

        at
scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)

        at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)

        at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)

        at
scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:742)

        at
kafka.controller.PartitionStateMachine.triggerOnlinePartitionStateChange(PartitionStateMachine.scala:96)

        at
kafka.controller.PartitionStateMachine.startup(PartitionStateMachine.scala:68)

        at
kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:312)

        at
kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:162)

        at
kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:63)

        at
kafka.server.ZookeeperLeaderElector$$anonfun$startup$1.apply$mcZ$sp(ZookeeperLeaderElector.scala:49)

        at
kafka.server.ZookeeperLeaderElector$$anonfun$startup$1.apply(ZookeeperLeaderElector.scala:47)

        at
kafka.server.ZookeeperLeaderElector$$anonfun$startup$1.apply(ZookeeperLeaderElector.scala:47)

        at kafka.utils.Utils$.inLock(Utils.scala:538)

        at
kafka.server.ZookeeperLeaderElector.startup(ZookeeperLeaderElector.scala:47)

        at
kafka.controller.KafkaController$$anonfun$startup$1.apply$mcV$sp(KafkaController.scala:637)

        at
kafka.controller.KafkaController$$anonfun$startup$1.apply(KafkaController.scala:633)

        at
kafka.controller.KafkaController$$anonfun$startup$1.apply(KafkaController.scala:633)

        at kafka.utils.Utils$.inLock(Utils.scala:538)

        at
kafka.controller.KafkaController.startup(KafkaController.scala:633)

        at kafka.server.KafkaServer.startup(KafkaServer.scala:96)

        at
kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:34)

        at kafka.Kafka$.main(Kafka.scala:46)

        at kafka.Kafka.main(Kafka.scala)


Thanks,

Prakash