Skip to content

Warn on DNS lookup failures #1091

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

Merged
merged 1 commit into from
May 3, 2017
Merged

Warn on DNS lookup failures #1091

merged 1 commit into from
May 3, 2017

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Apr 29, 2017

BrokerConnection currently raises a socket exception if dns resolution of broker metadata fails. This error is typically unhandled by application code and causes a hard crash. In many cases, this error is recoverable after short delay (temporary dns infrastructure problems) and/or refresh metadata (configuration errors). This PR changes the response to dns lookup errors to no longer raise an exception and instead just log a warning.

@jianbin-wei
Copy link
Contributor

I experienced that error while doing tests using docker. Nice to have this change.

One question: will the retry handle by the client or need to be handled by application?

@dpkp
Copy link
Owner Author

dpkp commented May 1, 2017

Retries should happen as with any other connection failure. Which means that for metadata requests, the retries will happen transparently. Consumer fetches should also retry transparently. For produce requests, the batch will use the retries configuration and may fail if the error is not resolved before the maximum retry attempts are exhausted.

@dpkp dpkp merged commit 83617b9 into master May 3, 2017
@jeffwidman jeffwidman deleted the warn_dns_error branch May 4, 2017 05:36
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Aug 25, 2017
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Oct 6, 2017
88manpreet pushed a commit to Yelp/kafka-python that referenced this pull request Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants