1
resposta

Problema ao subir o Kafka.

Boa noite pessoal , consegui subir o Zookeeper normalmente, mas não estou conseguindo subir o Kafka-server-start-bat., já que eu uso o windows. Estou tentando subir pelo GitBash.

[2021-10-29 18:31:08,841] WARN Session 0x0 for server localhost/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.lang.IllegalArgumentException: Unable to canonicalize address localhost/<unresolved>:2181 because it's not resolvable
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:65)
        at org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
        at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1001)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1060)
[2021-10-29 18:31:09,249] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2021-10-29 18:31:10,072] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper)
[2021-10-29 18:31:10,072] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn)
[2021-10-29 18:31:10,078] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2021-10-29 18:31:10,085] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
        at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:258)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:253)
        at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:254)
        at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:112)
        at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1826)
        at kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:364)
        at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:387)
        at kafka.server.KafkaServer.startup(KafkaServer.scala:207)
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
        at kafka.Kafka$.main(Kafka.scala:84)
        at kafka.Kafka.main(Kafka.scala)
[2021-10-29 18:31:10,088] INFO shutting down (kafka.server.KafkaServer)
[2021-10-29 18:31:10,105] INFO shut down completed (kafka.server.KafkaServer)
[2021-10-29 18:31:10,106] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2021-10-29 18:31:10,112] INFO shutting down (kafka.server.KafkaServer)
1 resposta

Oi Paulo

Sobre esse erro: Unable to canonicalize address localhost

Qual versão do kafka você está usando? Tenta atualizar para uma mais recente tipo a 2.8.1