-
Notifications
You must be signed in to change notification settings - Fork 689
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
Unable to connect to a http/2 gRPC application through envoy/contour #152
Comments
I found part of the problem by putting envoy in debug mode (and understanding, btw, more o less how everything works!) and realising that I wasn't setting authority correctly. But...now it seems that envoy is trying to connect to the upstreams with http1 instead of http2/gRPC. How does envoy/contour detect if it should use one or the other? I expected it to do so every time it sees an This is the error: The error seems reasonable because my service is sending responses in h2. Full request logs:
|
Thanks for that debugging, this looks like it is related to #15. The TL;DR is contour defaults to all backends (what envoy calls clusters) in http/1 non tls. |
Also issue #14 |
Thanks @davecheney.
It's related to both with and without tls. Basically is the same as the first bullet point in #14:
What I don't know, and don't have time to read docs and investigate further, how envoy knows which protocol to use in the upstream. It seems like we can hint envoy by telling it which features it has but i don't really know :\ I would have expected it to work automagically, at least for gRPC, based on the |
@glerchundi adding grpc support is easy just adding Http2ProtocolOptions to cluster config. I have implemented it in order to test if it is possible. |
@sercand cool! do you mind sending a PR and we can discuss the final solution there? We can put on the table grpc-web support as well. |
I'd like to see this annotation defined on the ingress object, not the service. This means its blocked behind #211 |
Hmm. On reflection I think service is fine, but the annotation should probable be something like
That is, you call out that port (name or number) is h2. A similar pattern could apply to backend TLS options. |
@glerchundi do you feel like submitting a PR? We're closing in on 0.4 this thursday, but maybe you want to try for this release? |
Ok, so in order to confirm that we're talking about the same approach, let me put some examples:
Or these ones, following the example above:
Or even this would be possible:
I'm right? |
Yup, all of those (although the last one is sheer masochism :( ) The way we should process these is put them into a map; then for each service entry in the Service document; add http2 options if the services' name or port is in the map. |
Yep that is what I did in this PR: #272. |
Fixes projectcontour#152 Signed-off-by: Gorka Lerchundi Osa <glertxundi@gmail.com>
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
First of all, thanks for this project. Looks very promising.
TLTR, I'm receiving
upstream connect error or disconnect/reset before headers
which seems that I misconfigured something but I'm not able to discover what!Lets get hands dirty, I deployed everything in GKE with Kubernetes 1.8.6. Two namespaces
edge-system
&space-system
.edge-system
contains contour + envoy.space-system
contains my testing gRPC service (take a look to the proto). The application service is working as expected because I made aN in-cluster test by running an one-shot client container and check if everything is behaving as I would expect.It worked even deploying it inside the envoy container. Concretely, I made two tests, one accessing directly to the endpoint and the other going through the service:
So the conclusion is that something is going between envoy and the upstream. Now lets dig into the ingresses and if contour configure envoy as expected. I created just one ingress
test.mydomain.com
:And seems like
contour
caught it:It seems like something is not working properly in envoy (see
rq_error
s) but I cannot figure out what. Checking Envoys log didn't help at all (at least for me) because it seems like access and error logs are interleaved and I didn't find any way to debug application errors easily...Sorry for the long-post, can anyone help ME shedding some light diagnosing what could be causing this?
Thanks!
test.proto
:The text was updated successfully, but these errors were encountered: