Hi James,

That's not an unresponsive node that's killing Kafka, that's a failure to
resolve the address that's killing it - my personal expectation would be
that even though zookeeper-2.zookeeper.etc may be down, its name should
still resolve.

Regards,

Liam Clarke



On Wed, Sep 26, 2018 at 10:02 PM James Yu <cyu...@gmail.com> wrote:

> Hi,
>
> I fail to start kafka broker when the corresponding zookeeper cluster is in
> working but unhealthy state.
>
> The zookeeper cluster is made of 3 nodes: zookeeper-0, zookeeper-1,
> zookeeper-2.
>
> I put all 3 zookeeper nodes into kafka's server.properties, specifically
> for zookeeper.connect attribute as as:
>
> zookeeper.connect=zookeeper-0.zookeeper.default.svc.cluster.local:2181,zookeeper-1.zookeeper.default.svc.cluster.local:2181,zookeeper-2.zookeeper.default.svc.cluster.local:2181
>
> I intentionally terminate zookeeper-2 and let zookeeper cluster work with
> only two nodes (zookeeper-0, zookeeper-1). Then I start start kafka and get
> the following error message:
> [2018-09-26 09:57:23,841] INFO Initiating client connection,
>
> connectString=zookeeper-0.zookeeper.default.svc.cluster.local:2181,zookeeper-1.zookeeper.default.svc.cluster.local:2181,zookeeper-2.zookeeper.default.svc.cluster.local:2181
> sessionTimeout=6000
> watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@49ec71f8
> (org.apache.zookeeper.ZooKeeper)
> [2018-09-26 09:57:24,100] ERROR Fatal error during KafkaServer startup.
> Prepare to shutdown (kafka.server.KafkaServer)
> java.net.UnknownHostException:
> zookeeper-2.zookeeper.default.svc.cluster.local: Name or service not known
>         at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
>         at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
>         at
> java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
>         at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1192)
>         at java.net.InetAddress.getAllByName(InetAddress.java:1126)
>         at
>
> org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:61)
>         at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:445)
>         at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:380)
>         at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:86)
>         at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1538)
>         at
>
> kafka.server.KafkaServer.kafka$server$KafkaServer$$createZkClient$1(KafkaServer.scala:345)
>         at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:369)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:202)
>         at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
>         at kafka.Kafka$.main(Kafka.scala:92)
>         at kafka.Kafka.main(Kafka.scala)
> [2018-09-26 09:57:24,104] INFO shutting down (kafka.server.KafkaServer)
> [2018-09-26 09:57:24,107] WARN  (kafka.utils.CoreUtils$)
> java.lang.NullPointerException
>         at
>
> kafka.server.KafkaServer$$anonfun$shutdown$5.apply$mcV$sp(KafkaServer.scala:569)
>         at kafka.utils.CoreUtils$.swallow(CoreUtils.scala:85)
>         at kafka.server.KafkaServer.shutdown(KafkaServer.scala:569)
>         at kafka.server.KafkaServer.startup(KafkaServer.scala:326)
>         at
> kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
>         at kafka.Kafka$.main(Kafka.scala:92)
>         at kafka.Kafka.main(Kafka.scala)
> [2018-09-26 09:57:24,112] INFO shut down completed
> (kafka.server.KafkaServer)
> [2018-09-26 09:57:24,112] ERROR Exiting Kafka.
> (kafka.server.KafkaServerStartable)
> [2018-09-26 09:57:24,115] INFO shutting down (kafka.server.KafkaServer)
>
> I thought we can start a kafka as long as the zookeeper cluster is
> working.regardless there is one zookeeper node (3 in total) fails to run?
>
>
> This is a UTF-8 formatted mail
> -----------------------------------------------
> James C.-C.Yu
> +886988713275
> +8615618429976
>

Reply via email to