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, 2020 in Apache Kafka by akhtar
• 38,260 points
14,681 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

Hope this will work

Join our Kafka course online today to become certified expert.

Thank You

answered Feb 5, 2020 by MD
• 95,460 points

Related Questions In Apache Kafka

+1 vote
1 answer
0 votes
1 answer
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, 2020 in Apache Kafka by MD
• 95,460 points
3,896 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
• 11,380 points
11,032 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
• 11,380 points
2,540 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,850 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,350 points
4,615 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, 2020 in Apache Kafka by MD
• 95,460 points
4,432 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP