Open harshit2205 opened 3 years ago
I seem to be having the same issue. Did u find any solution to this?
take a look at #389. For me, I run zookeeper and kafka on the same docker image. So I had to introduce a 20 second delay between zookeeper starting and running kafka so that zookeeper would invalidate its cache
I have created a batch file that sets up KAFKA initially so it would reduce my time for a startup. below is the part of it for starting the zookeeper as well as Kafka instances with 6 sec gap:
start cmd.exe /c zookeeper-server-start.bat config\zookeeper.properties TIMEOUT /T 6 /NOBREAK start cmd.exe /c Kafka-server-start.bat config\server.properties
Now, whenever I run my batch job the zookeeper batch files run smoothly but the Kafka batch file gives up an error while starting as given below:
12021-05-06 01:30:32,449] INFO [LogDirFailureHandler]: Starting (kafka.server. ReplicaManager $LogDirFailureHandler 12021-05-06 01:30:32,546] INFO Creating /brokers/ids/e (is it secure? false) (kafka.zk.KafkazkClient) 12021-05-06 01:30:32,614] ERROR Error while creating ephemeral at /brokers/ids/@, node already exists and owner '72058047193481216' does not match current session 7205 8053053317120' (kafka.zk.KafkaZkClient $CheckedEphemeral) 12021-05-06 01:30:32,632] ERROR [KafkaServer id=6] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer org.apache.Zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists at org.apache.zookeeper.KeeperException.create(KeeperException.java:126) at kafka.zk.KafkaZkclient$CheckedEphemeral.getAfterNodeExists(KafkaZkClient.scala:1984) at kafka.zk.KafkaZkclient$CheckedEphemeral.create(KafkaZkClient.scala:1842) at kafka.zk.KafkaZkclient.checkedEphemeralcreate(KafkaZkclient.scala:1809), at kafka.zk.Kafkazkclient.registerBroker (KafkaZkClient.scala:96) at kafka.server.KafkaServer.startup(KafkaServer.scala:308) at kafka. Kafka$.main(Kafka.scala:109)
How can I resolve this issue?
Thanks in advance