question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection stuck if first broker on the list is down

See original GitHub issue

Issue: let config = { brokers: ['broker1:9092', 'broker2:9092', 'broker3:9092'] } assuming broker1:9092 is down, kafkajs will fail to connect to the cluster. But if the order is : let config = { brokers: ['broker2:9092', 'broker1:9092', 'broker3:9092'] } or let config = { brokers: ['broker3:9092', 'broker2:9092', 'broker1:9092'] } The connection will work fine.

I’d expect kafkajs to be able to connect to the cluster in case one broker is down, and that broker is the first on the list, WDYT?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
itayadlercommented, May 22, 2019

Update: it seems that it does manage to connect https://github.com/tulios/kafkajs/blob/master/src/broker/index.js#L79 but it get stuck on this call https://github.com/tulios/kafkajs/blob/master/src/broker/index.js#L82 which is related to the issue I currently have with this broker, so perhaps adding a timeout to this call will make the client more robust to this edge case

0reactions
tulioscommented, Jun 6, 2019

Fixed by #369

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Can't I Connect to Kafka? | Troubleshoot Connectivity
The initial connection to a broker (the bootstrap). This returns metadata to the client, including a list of all the brokers in the...
Read more >
Troubleshoot SQL Server Service Broker issues - Operations ...
Describes common troubleshooting steps for SQL Server Service Broker-related issues in System Center Operations Manager.
Read more >
Spring Container hangs if ActiveMQ is not started
The createSession call is triggering the client to try and send its connection information request to the Broker but that can't happen until...
Read more >
Broker Hangs after some time - or does nothing.-Apache Mail ... - Re
So, first off, the "Connection reset" error means a client is losing > connection to the broker without cleaning up first - not...
Read more >
Troubleshooting connectivity issues between the agent, client ...
While deploying a pool, virtual machines are stuck with a status of Customizing on the Virtual Machines tab. · Connection to the virtual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found