You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Sriharsha Chintalapani (JIRA)" <ji...@apache.org> on 2015/01/20 22:06:35 UTC

[jira] [Commented] (KAFKA-1596) Exception in KafkaScheduler while shutting down

    [ https://issues.apache.org/jira/browse/KAFKA-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284409#comment-14284409 ] 

Sriharsha Chintalapani commented on KAFKA-1596:
-----------------------------------------------

[~nehanarkhede] [~guozhang] looks like KAFKA-1724 is a duplicate of this. I have details on how it happens on that JIRA and steps to reproduce.  This is easy to reproduce in single-host env.  We have two instances of KafkaScheduler being initiated one in KafkaBroker and another one in KafkaController.autoRebalanceScheduler.  KafkaBroker.kafkaScheduler will start initially but incase if the broker is the controller and before it starts up, if there is onControllerResignation gets called due to zookeeper watcher it calls KafkaScheduler.shutdown() which is not started yet causing above exception to be thrown.  More details are under  the reviewboard here https://reviews.apache.org/r/28027/ . Please check my comments there.

> Exception in KafkaScheduler while shutting down
> -----------------------------------------------
>
>                 Key: KAFKA-1596
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1596
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Joel Koshy
>              Labels: newbie
>         Attachments: kafka-1596.patch
>
>
> Saw this while trying to reproduce KAFKA-1577. It is very minor and won't happen in practice but annoying nonetheless.
> {code}
> [2014-08-14 18:03:56,686] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
> [2014-08-14 18:03:56,776] INFO Loading logs. (kafka.log.LogManager)
> [2014-08-14 18:03:56,783] INFO Logs loading complete. (kafka.log.LogManager)
> [2014-08-14 18:03:57,120] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
> [2014-08-14 18:03:57,124] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
> [2014-08-14 18:03:57,158] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
> [2014-08-14 18:03:57,160] INFO [Socket Server on Broker 0], Started (kafka.network.SocketServer)
> ^C[2014-08-14 18:03:57,203] INFO [Kafka Server 0], shutting down (kafka.server.KafkaServer)
> [2014-08-14 18:03:57,211] INFO [Socket Server on Broker 0], Shutting down (kafka.network.SocketServer)
> [2014-08-14 18:03:57,222] INFO [Socket Server on Broker 0], Shutdown completed (kafka.network.SocketServer)
> [2014-08-14 18:03:57,226] INFO [Replica Manager on Broker 0]: Shut down (kafka.server.ReplicaManager)
> [2014-08-14 18:03:57,228] INFO [ReplicaFetcherManager on broker 0] shutting down (kafka.server.ReplicaFetcherManager)
> [2014-08-14 18:03:57,233] INFO [ReplicaFetcherManager on broker 0] shutdown completed (kafka.server.ReplicaFetcherManager)
> [2014-08-14 18:03:57,274] INFO [Replica Manager on Broker 0]: Shut down completely (kafka.server.ReplicaManager)
> [2014-08-14 18:03:57,276] INFO Shutting down. (kafka.log.LogManager)
> [2014-08-14 18:03:57,296] INFO Will not load MX4J, mx4j-tools.jar is not in the classpath (kafka.utils.Mx4jLoader$)
> [2014-08-14 18:03:57,297] INFO Shutdown complete. (kafka.log.LogManager)
> [2014-08-14 18:03:57,301] FATAL Fatal error during KafkaServerStable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
> java.lang.IllegalStateException: Kafka scheduler has not been started
>         at kafka.utils.KafkaScheduler.ensureStarted(KafkaScheduler.scala:114)
>         at kafka.utils.KafkaScheduler.schedule(KafkaScheduler.scala:95)
>         at kafka.server.ReplicaManager.startup(ReplicaManager.scala:138)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:112)
>         at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:28)
>         at kafka.Kafka$.main(Kafka.scala:46)
>         at kafka.Kafka.main(Kafka.scala)
> [2014-08-14 18:03:57,324] INFO [Kafka Server 0], shutting down (kafka.server.KafkaServer)
> [2014-08-14 18:03:57,326] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread)
> [2014-08-14 18:03:57,329] INFO Session: 0x147d5b0a51a0000 closed (org.apache.zookeeper.ZooKeeper)
> [2014-08-14 18:03:57,329] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn)
> [2014-08-14 18:03:57,329] INFO [Kafka Server 0], shut down completed (kafka.server.KafkaServer)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)