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

KAFKA-7111: Log error connecting to node at a higher log level #5312

Merged
merged 1 commit into from
Jun 29, 2018
Merged

KAFKA-7111: Log error connecting to node at a higher log level #5312

merged 1 commit into from
Jun 29, 2018

Conversation

stanislavkozlovski
Copy link
Contributor

There were cases where the broker would return an unresolve-able address (e.g broker inside a docker network while client is outside) and the client would not log any information as to why it is timing out, since the default log level does not print DEBUG messages.

Changing this log level will enable easier troubleshooting in such circumstances. This change does not change the logs shown on transient failures like a broker failure, judging from my local tests.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

There were cases where the broker would return an unresolve-able address (e.g broker inside a docker network while client is outside) and the client would not log any information as to why it is timing out
Copy link
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stanislavkozlovski Thanks for the PR, LGTM. Merging to trunk and 2.0 since it helps diagnose configuration errors.

@rajinisivaram rajinisivaram merged commit 053d831 into apache:trunk Jun 29, 2018
rajinisivaram pushed a commit that referenced this pull request Jun 29, 2018
There are cases where the broker would return an unresolve-able address (e.g broker inside a docker network while client is outside) and the client would not log any information as to why it is timing out, since the default log level does not print DEBUG messages.

Changing this log level will enable easier troubleshooting in such circumstances. This change does not change the logs shown on transient failures like a broker failure.
@ijuma
Copy link
Contributor

ijuma commented Jul 2, 2018

Can you please explain why this won't cause a lot of log spam if a broker is down?

@stanislavkozlovski
Copy link
Contributor Author

stanislavkozlovski commented Jul 3, 2018

We had that in mind - my tests did not see this log be outputted in the scenario where a broker is down and the client is trying to connect

@rajinisivaram
Copy link
Contributor

@ijuma For async SocketChannel#connect, you are unlikely to see exceptions when initiating the connection unless the connection could not be initiated due to errors like unresolvable address. If the broker is down, we are more likely to see an exception when we invoke SocketChannel#finishConnect. In clients, we already log a warning without the exception stack trace for this case:

Connection to node 0 could not be established. Broker may not be available.

ying-zheng pushed a commit to ying-zheng/kafka that referenced this pull request Jul 6, 2018
…e#5312)

There are cases where the broker would return an unresolve-able address (e.g broker inside a docker network while client is outside) and the client would not log any information as to why it is timing out, since the default log level does not print DEBUG messages.

Changing this log level will enable easier troubleshooting in such circumstances. This change does not change the logs shown on transient failures like a broker failure.
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.

3 participants