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

GRPC routes not working possible bug? #364

Closed
owenhaynes opened this issue May 3, 2018 · 6 comments
Closed

GRPC routes not working possible bug? #364

owenhaynes opened this issue May 3, 2018 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@owenhaynes
Copy link

Hi,

Having a play with contour to see if its possible to switch from the nghttpx-ingress controller we currently use for internal load traffic.

This traffic is mostly GRPC traffic over use the basic GRPC server set up, these are insecure connections at the moment.

It looks like the GRPC pass through is not working in contour v0.5.0. The clients make the connections but envoy seems to report 404 not found for the endpoints

[2018-05-03T08:01:04.449Z] "POST /node.HeartBeatService/Heartbeat HTTP/2" 404 NR 0 0 0 - "10.20.2.1" "grpc-go/1.11.3" "2a2652fd-9739-43c9-849b-3448d6d20e34" "status.nodes.internal:80" "-" [2018-05-03T08:01:04.450Z] "POST /node.HeartBeatService/Heartbeat HTTP/2" 404 NR 0 0 0 - "10.20.2.1" "grpc-go/1.11.3" "70da1984-0af0-486c-8211-e14616c377ca" "status.nodes.internal:80" "-" [2018-05-03T08:01:07.747Z] "POST /node.HeartBeatService/Heartbeat HTTP/2" 404 NR 0 0 0 - "10.20.2.1" "grpc-go/1.11.3" "0e7d1cfa-097f-4688-ad03-78da8da7eb24" "status.nodes.internal:80" "-"

The h2 annotations are set on the service
apiVersion: v1 kind: Service metadata: annotations: contour.heptio.com/upstream-protocol.h2: "6001"
am i missing something?

@davecheney
Copy link
Contributor

Can you tell me more about your backend service, when you say "insecure" do you mean they are not using TLS?

@davecheney davecheney added the blocked/needs-info Categorizes the issue or PR as blocked because there is insufficient information to advance it. label May 9, 2018
@owenhaynes
Copy link
Author

owenhaynes commented May 9, 2018

Yes by insecure no TLS. Backed service is nothing to complex, just the ordinary set up like GRPC recommends.

Server:

lis, err := net.Listen("tcp", ":6001")
if err != nil {
  //Do some handling
}
s := grpc.NewServer()
//Register services
s.Serve(lis)

Client:

conn, err := grpc.Dial("service:6001", grpc.WithInsecure())
if err != nil {
  //Do some handling
}
defer conn.Close()
//Create clients

@davecheney
Copy link
Contributor

davecheney commented May 9, 2018

I think what is happening is Envoy expects grpc connections to be using TLS.

@davecheney davecheney added kind/bug Categorizes issue or PR as related to a bug. and removed blocked/needs-info Categorizes the issue or PR as blocked because there is insufficient information to advance it. labels May 9, 2018
@davecheney davecheney added this to the 0.6.0 milestone May 9, 2018
@davecheney davecheney self-assigned this May 9, 2018
@davecheney davecheney removed this from the 0.6.0 milestone May 9, 2018
@mattalberts
Copy link

@davecheney I'm seeing the same issue. I built out a detailed example/setup in #379 to use as reference. The example includes a cert generation and configuring the TLS secret. Requesting a resource via a gRPC client or grpcurl results in a NR (no cluster for URL); however, requesting the resource with curl or a browser triggers a match.

@davecheney
Copy link
Contributor

@owenhaynes thanks for raising this bug, the underlying issue is #210 (and many others) (see linked issue for the underlying envoy issue).

"status.nodes.internal:80"

^ the trailing :80 is causing envoy to not match the route.

I'm going to talk to the upstream envoy devs about a possible workaround.

@davecheney davecheney added this to the 0.6.0 milestone May 15, 2018
@davecheney davecheney added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label May 15, 2018
@davecheney
Copy link
Contributor

Closed by #398

sunjayBhatia pushed a commit that referenced this issue Jan 30, 2023
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

3 participants