Fatal error during KafkaServer startup. Prepare to shutdown org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000

+1 vote

Hi,

I am new in apache kafka. I am getting the below error.

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
12:28:40.463 [main] FATAL kafka.server.KafkaServer - Fatal error during KafkaServer startup. Prepare to shutdown
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
        at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1223) ~[zkclient-0.7.jar:0.7]
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155) ~[zkclient-0.7.jar:0.7]
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:129) ~[zkclient-0.7.jar:0.7]
        at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:89) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.utils.ZkUtils$.apply(ZkUtils.scala:71) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServer.initZk(KafkaServer.scala:278) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServer.startup(KafkaServer.scala:168) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.Kafka$.main(Kafka.scala:67) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.Kafka.main(Kafka.scala) [kafka_2.11-0.9.0.0.jar:?]
12:28:40.502 [main] FATAL kafka.server.KafkaServerStartable - Fatal error during KafkaServerStartable startup. Prepare to shutdown
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
        at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1223) ~[zkclient-0.7.jar:0.7]
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155) ~[zkclient-0.7.jar:0.7]
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:129) ~[zkclient-0.7.jar:0.7]
        at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:89) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.utils.ZkUtils$.apply(ZkUtils.scala:71) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServer.initZk(KafkaServer.scala:278) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServer.startup(KafkaServer.scala:168) ~[kafka_2.11-0.9.0.0.jar:?]
        at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.Kafka$.main(Kafka.scala:67) [kafka_2.11-0.9.0.0.jar:?]
        at kafka.Kafka.main(Kafka.scala) [kafka_2.11-0.9.0.0.jar:?]

Can someone tell me why I'm getting this error?

Thank You

Feb 5 in Apache Kafka by akhtar
• 10,150 points
879 views

1 answer to this question.

0 votes

HI@akhtar,

You get this error because before stating the kafka server you have to start zookeeper server.

In kafka zookeeper is used to manage the kafka server.

$ ./bin/zkServer.sh start

$ ./bin/zkCli.sh

$ ./bin/kafka-server-start.sh config/server.properties

Hove this will work

Thank You

answered Feb 5 by MD
• 22,020 points

Related Questions In Apache Kafka

0 votes
1 answer

Error: pass --path /path/to/confluent flag or set environment variable CONFLUENT_HOME

Hi@akhtar, Before starting confluent kafka in your system, ...READ MORE

answered Apr 3 in Apache Kafka by MD
• 22,020 points
103 views
0 votes
1 answer

How can i connect to an api which gives me weather data to Apache kafka?

Hi, To connect an API in kafka, you ...READ MORE

answered Apr 13 in Apache Kafka by MD
• 22,020 points
64 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,063 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
719 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
29,843 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
1,890 views
0 votes
1 answer

error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)

Hi@akhtar, This error occurs because zookeeper is running already. So ...READ MORE

answered Mar 31 in Apache Kafka by MD
• 22,020 points
41 views