You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Joel Koshy (JIRA)" <ji...@apache.org> on 2011/08/12 03:17:27 UTC

[jira] [Created] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

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


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

        

[jira] [Commented] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083876#comment-13083876 ] 

Jun Rao commented on KAFKA-94:
------------------------------

Thanks, Joel. Just committed this.

> 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

        

[jira] [Resolved] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Commented] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087296#comment-13087296 ] 

Neha Narkhede commented on KAFKA-94:
------------------------------------

The behavior of the mirror.topics.whitelist is backwards incompatible. If some users currently have a whitelist setup with the old format (topic1:numPartitions1, topic2:numPartitions2), it is ideal to just rename "embedded.consumer.topics" to "mirror.topics.whitelist". Instead, this change forces those users to change their white-listed topics list to strip off the number of partitions. It would be ideal if the number of partitions is just ignored, with a little warning message. That way the change is backwards compatible.

If a user just renames "embedded.consumer.topics"  to "mirror.topics.whitelist" and leaves the number of partitions, currently the corp replica behavior is to not mirror anything at all. That is unintuitive.

> 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

        

[jira] [Commented] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083866#comment-13083866 ] 

Neha Narkhede commented on KAFKA-94:
------------------------------------

+1. Thanks for the patch.

> 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

        

[jira] [Updated] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Neha Narkhede (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neha Narkhede updated KAFKA-94:
-------------------------------

    Comment: was deleted

(was: The behavior of the mirror.topics.whitelist is backwards incompatible. If some users currently have a whitelist setup with the old format (topic1:numPartitions1, topic2:numPartitions2), it is ideal to just rename "embedded.consumer.topics" to "mirror.topics.whitelist". Instead, this change forces those users to change their white-listed topics list to strip off the number of partitions. It would be ideal if the number of partitions is just ignored, with a little warning message. That way the change is backwards compatible.

If a user just renames "embedded.consumer.topics"  to "mirror.topics.whitelist" and leaves the number of partitions, currently the corp replica behavior is to not mirror anything at all. That is unintuitive.)

> 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

        

[jira] [Updated] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joel Koshy updated KAFKA-94:
----------------------------

    Attachment: kafka-94.patch.v1

> 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

        

[jira] [Commented] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083863#comment-13083863 ] 

Joel Koshy commented on KAFKA-94:
---------------------------------

Since the logmanager is also uninitialized, we should check for that as well.

2011/08/12 00:22:36.191 FATAL [KafkaServer] [pool-2-thread-1] [kafka] org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 300000
	at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:876)
	at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98)
	at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:84)
	at kafka.server.KafkaZooKeeper.startup(KafkaZooKeeper.scala:45)
	at kafka.log.LogManager.<init>(LogManager.scala:86)
	at kafka.server.KafkaServer.startup(KafkaServer.scala:59)
	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)

> 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
>
> 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

        

[jira] [Commented] (KAFKA-94) KafkaServer can throw a NullPointerException during startup if zookeeper is down

Posted by "Jay Kreps (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088122#comment-13088122 ] 

Jay Kreps commented on KAFKA-94:
--------------------------------

Should this be closed?

> 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