Petre Adrian created KAFKA-7256: ----------------------------------- Summary: First started Kafka server & leader failure blocks consumers Key: KAFKA-7256 URL: https://issues.apache.org/jira/browse/KAFKA-7256 Project: Kafka Issue Type: Bug Components: core Affects Versions: 2.0.0 Environment: Ubuntu 16.04.5 LTS Reporter: Petre Adrian
I'm basically doing the kafka [quickstart|https://kafka.apache.org/quickstart] using [kafka_2.11-2.0.0|http://mirrors.nav.ro/apache/kafka/2.0.0/kafka_2.11-2.0.0.tgz] which comes with zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT. I do these with the order below: * start zookeeper * start kafka server0 with port 9092 * start kafka server1 with port 9093 * start kafka server2 with port 9094 * create a topic: kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 1 --topic my-replicated-topic * produce some messages: kafka-console-producer.sh --broker-list localhost:9092 --topic my-replicated-topic * consume from server0: kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic my-replicated-topic * consume from server1: kafka-console-consumer.sh --bootstrap-server localhost:9093 --from-beginning --topic my-replicated-topic * check the leader for my-replicated-topic and find it to be server0 -> here's the tricky part; one should kill server1 and then maybe server2 but never server0 and then restore them just in order to get server0 to be the leader of my-replicated-topic * kill server0 * check for the new leader (happens to be server2): kafka-topics.sh --describe --zookeeper localhost:2181 --topic my-replicated-topic * produce some messages to server2: kafka-console-producer.sh --broker-list localhost:9094 --topic my-replicated-topic * consume from server2 (or server1): kafka-console-consumer.sh --bootstrap-server localhost:9094 --from-beginning --topic my-replicated-topic -> *this will hang till restarting server0* * starting again server0 * consumer from server2 outputs all messages including the one sent to server2 when was the leader The problem is the hanging part which should not happen. Please respond when fixed to: [https://stackoverflow.com/questions/51735006/first-started-kafka-server-leader-failure-blocks-consumers] Thank you! -- This message was sent by Atlassian JIRA (v7.6.3#76005)