0

This is my traefik configuration


[entryPoints]
  [entryPoints.http]
  address = ":81"

[file]
 [backends]
   [backends.backend1]
     [backends.backend1.servers.server1]
     url = "h2c://10.141.11.230:6566"
 [frontends]
   [frontends.frontend1]
   entryPoints = ["http"]
   backend = "backend1"

When grpc server is being invoked by js web client via traefik proxy, I'm getting this warning on server side

WARN 22160 --- [-worker-ELG-3-1] io.grpc.netty.NettyServerHandler         : Expected header TE: trailers, but null is received. This means some intermediate proxy may not support trailers

The service method is not invoked.

Client get's 415 (Unsupported Media Type) response.

Traefik 1.7.16

Grpc-java 1.22.1

grpc-web@1.0.6

What am I missing ? Thanks

Alexander.Furer
  • 1,817
  • 1
  • 16
  • 24

1 Answers1

0

The TE: trailers warning is a false alarm in your situation; I've created a grpc-java PR to prevent it in the future.

The 415 is the true failure. That means that the client is using a content-type that isn't application/grpc. This is because grpc-web uses an alternate protocol which needs to be converted. Converting the protocol is typically done with a proxy; that's what the Envoy proxy does that's mentioned on the grpc-web repository.

Eric Anderson
  • 24,057
  • 5
  • 55
  • 76
  • Thanks, I was under impression that traefik translates http to http2 like envoy does. Found an open issue about supporting the conversion in their repository.... – Alexander.Furer Sep 25 '19 at 14:27
  • 1
    This is different from HTTP to HTTP/2. This is the grpc protocol formatting. grpc-web supports a plain-text encoding (for IE) and also avoids using trailers. See https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md#protocol-differences-vs-grpc-over-http2 – Eric Anderson Sep 25 '19 at 18:30