# Cannot reconnect to new broker ID from kafka cluster if Leader Kafka fail

**URL:** https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606
**Category:** Logstash
**Created:** [August 24, 2019, 3:46am UTC](https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606 "2019-08-24T03:46:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vidocq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vidocq/32/51130_2.png) [@vidocq](https://discuss.elastic.co/u/vidocq)
#### Post date: [August 24, 2019, 3:46am UTC](https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606/1 "2019-08-24T03:46:33Z")

</div>

Dear everyone!  
I have a logstash get log from 3 instances apache kafka and zookeeper cluster.  
When I test turn off the Leader zookeeper from cluster. Logstash still connect to OLD broker ID of OLD Leader, And traffic cannot show to Kibana.  
Please tell me how to change the new brokder ID, when Leader zookeeper fail.

Here is my apache.conf of logstash

input {  
kafka {  
bootstrap\_servers =\> '10.0.1.48:9092,10.0.1.49:9092,10.0.1.50:9092'  
topics =\> ["dns3000"]  
consumer\_threads =\> 3  
auto\_offset\_reset =\> "earliest"  
decorate\_events =\> "true"  
request\_timeout\_ms =\> "300"  
}  
}

filter {  
grok {  
match =\> { "message" =\> "%{COMBINEDAPACHELOG}" }  
}  
date {  
match =\> ["timestamp" , "dd/MMM/yyyy:HH:mm:ss Z"]  
}  
geoip {  
source =\> "clientip"  
}  
}

output {  
elasticsearch {  
hosts =\> ["10.0.1.43:9200"]  
}  
}

Here is logs of logstash

Aug 24 10:36:46 elk-logstash logstash[2834]: [2019-08-24T10:36:46,815][WARN][org.apache.kafka.clients.NetworkClient] [Consumer clientId=logstash-0, groupId=logstash] Connection to node -3 (/10.0.1.50:9092) could not be established. Broker may not be available.

Thanks!

---

<div class="post-metadata">

### Author: ![vidocq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vidocq/32/51130_2.png) [@vidocq](https://discuss.elastic.co/u/vidocq)
#### Post date: [August 26, 2019, 6:34am UTC](https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606/2 "2019-08-26T06:34:14Z")

</div>

Dear Pro,  
Please help me resolve this problem.  
thanks you!

---

<div class="post-metadata">

### Author: ![vidocq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vidocq/32/51130_2.png) [@vidocq](https://discuss.elastic.co/u/vidocq)
#### Post date: [September 4, 2019, 3:09am UTC](https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606/3 "2019-09-04T03:09:18Z")

</div>

Dear Pro,  
Please help me resolve this problem.  
thanks you!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 2, 2019, 3:19am UTC](https://discuss.elastic.co/t/cannot-reconnect-to-new-broker-id-from-kafka-cluster-if-leader-kafka-fail/196606/4 "2019-10-02T03:19:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
