Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadMessage ends up in a loop and does not come out when kafka broker gets deleted #1295

Open
kirannittur opened this issue May 23, 2024 · 0 comments
Labels

Comments

@kirannittur
Copy link

kirannittur commented May 23, 2024

Describe the bug

ReadMessage ends up in a loop and does not return when kafka broker gets deleted

Kafka Version

  • What version(s) of Kafka are you testing against? 3.6.0.redhat-00005
  • What version of kafka-go are you using? 0.4.47

To Reproduce
Install kafka on a separate namespace and controller that reads from kafka in a separate namespace
Uninstall kafka from a namespace this causes the ReadMessage call in a controller that is in a separate namespace hangs and does not return
Noticing below error in a loop

2024-05-23T02:07:05Z ERROR controllers.ServiceInstance Kafka Error {"error": "failed to dial: failed to open connection to a.b.c.d:9093: dial tcp: lookup a.b.c.d on xx.xx.xx.xx: no such host"}
github.com/segmentio/kafka-go.(*Reader).run.func2
/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:314
github.com/segmentio/kafka-go.(*Reader).withErrorLogger
/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1137
github.com/segmentio/kafka-go.(*Reader).run

Expected Behavior

Expect the Readmessage to return with proper error that way we can handle gracefully if user deletes kafka broker while our controller is in a Read block.

Observed Behavior

A clear and concise description of the behavior you observed.

Below message is printed in a loop and ReadMessage does not return

2024-05-23T02:07:05Z ERROR controllers.ServiceInstance Kafka Error {"error": "failed to dial: failed to open connection to a.b.c.d:9093: dial tcp: lookup a.b.c.d on xx.xx.xx.xx: no such host"}
github.com/segmentio/kafka-go.(*Reader).run.func2
/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:314
github.com/segmentio/kafka-go.(*Reader).withErrorLogger
/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1137
github.com/segmentio/kafka-go.(*Reader).run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant