IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.44k stars 1.75k forks source link

Kafka: client has run out of available brokers #2891

Closed logic-building closed 3 weeks ago

logic-building commented 4 months ago

Problem Description: (Not issue with latest sarama and latest kafka) I get the error: Kafka: client has run out of available brokers. Version: with kafka version : 2.11-1.0.0 and sarama version 1.43.2

and fix is 1.40.0 sarama version . Just wanted make note somewhere.

And I don't see this issue at all with latest kafka and latest sarama. kafka: 2.13_3.2.3 sarama: 1.43.2

puellanivis commented 4 months ago

Wait, what? We recently ran into this, and we were using v1.42.1… what change could have resolved this?

dnwe commented 4 months ago

@puellanivis I'm not sure if its the same for you, but in @logic-building 's case I think this is just a scenario of not pinning an explicit KafkaVersion in the sarama.Config field.

In Kafka 1.40.x and older the default value if you didn't have a pinned kafka version was 1.0.0.0 protocol. In Sarama 1.41.x and newer we bumped the default to 2.1.0.0 protocol as per the Changelog https://github.com/IBM/sarama/releases/tag/v1.41.0 — this was at the request of the Kafka maintainers who are looking to remove support for older protocol versions.

That's why the problem was resolved both by rolling back client version (then rolling back to default 1.x.x.x protocol) or by rolling forward kafka version (because it then supported protocol 2.1.0.0 fine).

puellanivis commented 4 months ago

I’ll keep an eye out. I think we only saw it the once. Also, I’m pretty sure we updated to the new version already as well.

github-actions[bot] commented 1 month ago

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.