-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Root cause of connection error not relayed to the caller #2128
Comments
@k-wall thanks for raising this issue, I agree entirely and it's a good suggestion. I think it would be fine for us to move to a model of Go 1.13 wrapped errors and simple document in our Changelog / release notes that there will be a breaking change whereby they must change any error comparison code from:
We could also add some helpers to |
…aluate error equality refactoring only - no functionality changes
…s that prevented connection
…s that prevented connection
…s that prevented connection
…aluate error equality mechancial refactoring only - no functionality changes
…s that prevented connection
…(s)s that prevented successful connection(s) to the brokers.
…aluate error equality mechancial refactoring only - no functionality changes
…(s)s that prevented successful connection(s) to the brokers.
…(s) that prevented successful connection(s) to the brokers.
mechancial refactoring only - no functional changes Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
mechancial refactoring only - no functional changes Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
mechancial refactoring only - no functional changes Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
mechancial refactoring only - no functional changes Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
mechancial refactoring only - no functional changes Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
Ensure that ErrOutOfBrokers exception(s) include the actual underlying error that prevented successful connection(s) to the brokers. Fixes IBM#2128
Problem Description
Currently if a sarama based application fails to connect to the cluster, unless the application is happens to have
sarama.Logger
defined (which is quite chatty for production), the only error message seen in the logs is:kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
without any more detail. The useful detail of connection refused, connection timeout, certificate expiration is lost.
From an operational perspective (production environment), the makes root cause determination slow. The application that uses sarama needs to be reconfigured to get more information, which is inconvenient.
From what can tell from the sarama client, the underlying error is not propagated to the caller. Is that right?
I'm contemplating a PR to expose the underlying errors back to the caller. Using Go 1.13 wrapped error pattern seems attractive, but this would be an API change for any user with code checking sarama's sentianal error values (
if error == ErrOutOfBrokers
etc). How would such a PR be viewed?Is there a less intrusive change?
The text was updated successfully, but these errors were encountered: