Kafka Multi Node setup "Unreasonable length" in Zookeeper logs
Asked Answered
H

1

15

I have setup a multi node setup for kafka, everything seems to work well and show no error logs unless i try to push message to one producer. I get a message:

Bootstrap broker host2:2181 disconnected (org.apache.kafka.clients.NetworkClient)

and on the zookeeper logs i am getting:

"WARN Exception causing close of session 0x0 due to java.io.IOException:
 Unreasonable length = 1701969920 (org.apache.zookeeper.server.NIOServerCnxn)"

i cleaned up my data directory which is "/var/zookeeper/data" still no luck.

Any help on the the would be much appriciated

Hutto answered 28/12, 2016 at 12:25 Comment(0)
R
44

Vaibhav looking at this line (Bootstrap broker host2:2181) looks like you are trying to connect to zookeeper instance rather than broker instance. By Default Kafka broker runs on 9092 port. So producer and consumer should be created as per below command

Producer :

bin/kafka-console-producer.sh --broker-list host1:9092,host2:9092 \
  --topic "topic_name"

Consumer:

bin/kafka-console-consumer.sh --bootstrap-server <host_ip_of_producer>:9092 \
  --topic "topic_name" --from-beginning
Resemble answered 5/1, 2017 at 12:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.