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

0 votes

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
• 1,440 points
52 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
• 2,750 points

Related Questions In Apache Kafka

0 votes
1 answer

Is there any change in consumer offsets if a new partition(s) is added to a Kafka topic?

Yes, it stays the same. An offset is ...READ MORE

answered Jul 9, 2018 in Apache Kafka by nitinrawat895
• 10,840 points
460 views
0 votes
1 answer

Re-balancing error while reading messages from Kafka.

rebalance.backoff.ms defines the time for which Kafka ...READ MORE

answered Jul 9, 2018 in Apache Kafka by Shubham
• 13,370 points
689 views
+1 vote
10 answers

Writing the Kafka consumer output to a file

System.out.println(String.valueOf(output.offset()) + ": " + new String(bytes, ...READ MORE

answered Dec 7, 2018 in Apache Kafka by Harsh
10,018 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,840 points
4,137 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,840 points
583 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
22,374 views
0 votes
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,552 views
0 votes
1 answer

What is the need of zookeeper in kafka? Can I use kafka without zookeeper?

Hi@akhtar, You can not use kafka without zookeeper. ...READ MORE

answered Feb 6 in Apache Kafka by MD
• 2,750 points
42 views