[ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Koshy resolved KAFKA-94. ----------------------------- Resolution: Fixed Yes - this has been committed. > KafkaServer can throw a NullPointerException during startup if zookeeper is > down > -------------------------------------------------------------------------------- > > Key: KAFKA-94 > URL: https://issues.apache.org/jira/browse/KAFKA-94 > Project: Kafka > Issue Type: Bug > Components: core > Reporter: Joel Koshy > Priority: Minor > Attachments: kafka-94.patch.v1 > > > Starting up KafkaServer when zookeeper is down can lead to a > NullPointerException as shown below. The LogManager throws a > ZkTimeoutException from startup if zookeeper is down. This is caught and we > call shutdown. socketServer is uninitialized at this point, and hence the > NPE. Will upload patch in a bit. > 2011/08/12 00:22:36.194 FATAL [KafkaServer] [pool-2-thread-1] [kafka] > java.lang.NullPointerException > at kafka.server.KafkaServer.shutdown(KafkaServer.scala:98) > at kafka.server.KafkaServer.startup(KafkaServer.scala:84) > at > kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:40) > at com.linkedin.kafka.KafkaStartable.start(KafkaStartable.java:49) > at > com.linkedin.spring.servlet.ComponentsContextLoaderListener.setServletContextAttributes(ComponentsContextLoaderListener.java:113) > at > com.linkedin.spring.servlet.ComponentsContextLoaderListener.contextInitialized(ComponentsContextLoaderListener.java:50) > at > org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) > at > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) > at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) > at > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) > at > com.linkedin.emweb.ContextBasedHandlerImpl.doStart(ContextBasedHandlerImpl.java:123) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) > at > com.linkedin.emweb.WebappDeployerImpl.start(WebappDeployerImpl.java:324) > at > com.linkedin.emweb.WebappDeployerImpl.deploy(WebappDeployerImpl.java:178) > at > com.linkedin.emweb.StateKeeperWebappDeployer.deploy(StateKeeperWebappDeployer.java:73) > at > com.linkedin.emweb.mbeans.WebappDeployerAdmin.deploy(WebappDeployerAdmin.java:86) > at > com.linkedin.emweb.mbeans.WebappDeployerAdmin$1.call(WebappDeployerAdmin.java:130) > at > com.linkedin.emweb.mbeans.WebappDeployerAdmin$1.call(WebappDeployerAdmin.java:127) > at > com.linkedin.emweb.mbeans.WebappDeployerAdmin$3.call(WebappDeployerAdmin.java:171) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira