-
Notifications
You must be signed in to change notification settings - Fork 2.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
hubble/relay: print better error message on peer conn dial failure #13484
Merged
gandro
merged 1 commit into
master
from
pr/rolinh/hubble-relay-improved-conn-error-logs
Oct 12, 2020
Merged
hubble/relay: print better error message on peer conn dial failure #13484
gandro
merged 1 commit into
master
from
pr/rolinh/hubble-relay-improved-conn-error-logs
Oct 12, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To connect to peers via gRPC, Hubble Relay uses `grpc.DialContext()` with a dial timeout. When a connection attempt to a peer fails, the following error message is returned: `context deadline exceeded`. This provides no value when trying to debug the issue. Is the peer unreachable? Is this a TLS configuration issue? etc. By using the dial option `grpc.FailOnNonTempDialError(true)`, we get better error messages on non-temporary dial errors, such as: connection error: desc = "transport: error while dialing: dial tcp 172.18.0.4:4244: connect: connection refused" Using the option `grpc.WithReturnConnectionError()`, we would get a message that contains both the last connection error that occurred and the `context.DeadlineExceeded` error. This greatly improves the situation for errors that are deemed transient. Example: context deadline exceeded: connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for *.hubble-relay.cilium.io, not localhost" However, this is only available starting with grpc-go v1.30.0 and due to the issue described here[0], we are currently stuck with v1.29.1. Thus, this commit adds the option but comments it with a TODO note so that it can be caught up and uncommented when upgrading grpc-go becomes possible. [0]: #13405 (comment) Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
kaworu
approved these changes
Oct 9, 2020
test-me-please |
test-gke |
1 similar comment
test-gke |
retest-4.9 |
glibsm
approved these changes
Oct 9, 2020
test-gke |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/cleanup
This includes no functional changes.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
sig/hubble
Impacts hubble server or relay
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To connect to peers via gRPC, Hubble Relay uses
grpc.DialContext()
with a dial timeout. When a connection attempt to a peer fails, the
following error message is returned:
context deadline exceeded
.This provides no value when trying to debug the issue. Is the peer
unreachable? Is this a TLS configuration issue? etc.
By using the dial option
grpc.FailOnNonTempDialError(true)
, we getbetter error messages on non-temporary dial errors, such as:
Using the option
grpc.WithReturnConnectionError()
, we would get amessage that contains both the last connection error that occurred and
the
context.DeadlineExceeded
error. This greatly improves thesituation for errors that are deemed transient. Example:
However, this is only available starting with grpc-go v1.30.0 and due to
the issue described here, we are currently stuck with v1.29.1. Thus,
this commit adds the option but comments it with a TODO note so that it
can be caught up and uncommented when upgrading grpc-go becomes
possible.