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

proxy pass header metadata #1

Open
liule opened this issue Jun 6, 2017 · 4 comments
Open

proxy pass header metadata #1

liule opened this issue Jun 6, 2017 · 4 comments

Comments

@liule
Copy link

liule commented Jun 6, 2017

Metadata can't pass client to server by grpc-proxy, what can I do to pass metadata , thanks a lot

@lalomartins
Copy link

There's a fork by @kruczjak at https://github.com/kruczjak/grpc-proxy which supposedly does that, but it crashes for me.

panic: interface conversion: *proxy.frame is not proto.Message: missing method ProtoMessage

goroutine 14 [running]:
panic(0x7ce140, 0xc420017280)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/mwitkow/grpc-proxy/proxy.protoCodec.Marshal(0x791400, 0xc420272520, 0xc4202c3d78, 0x46d2c9, 0xc420284280, 0xc4201806c9, 0x7)
        /go/src/github.com/mwitkow/grpc-proxy/proxy/codec.go:61 +0x61
github.com/mwitkow/grpc-proxy/proxy.(*protoCodec).Marshal(0xa60190, 0x791400, 0xc420272520, 0x0, 0x0, 0x7, 0x7, 0x0)
        <autogenerated>:1 +0x60
github.com/mwitkow/grpc-proxy/proxy.(*rawCodec).Marshal(0xc4202781a0, 0x791400, 0xc420272520, 0x0, 0x0, 0xc4202c3d78, 0x531a1b, 0xc420284280)
        /go/src/github.com/mwitkow/grpc-proxy/proxy/codec.go:38 +0x9e
google.golang.org/grpc.encode(0x7feddb04d040, 0xc4202781a0, 0x791400, 0xc420272520, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4202c3e90, ...)
        /go/src/google.golang.org/grpc/rpc_util.go:378 +0x2ea
google.golang.org/grpc.(*clientStream).SendMsg(0xc4202565a0, 0x791400, 0xc420272520, 0x0, 0x0)
        /go/src/google.golang.org/grpc/stream.go:387 +0x11a
github.com/simonhorlick/grpc-proxy/proxy.(*handler).forwardServerToClient.func1(0xa1b620, 0xc4202821e0, 0xc4200116e0, 0xa1b5c0, 0xc4202565a0)
        /go/src/github.com/simonhorlick/grpc-proxy/proxy/handler.go:162 +0xb3
created by github.com/simonhorlick/grpc-proxy/proxy.(*handler).forwardServerToClient
        /go/src/github.com/simonhorlick/grpc-proxy/proxy/handler.go:167 +0x89

I'm at my wits' end with a sane way to route grpc to multiple services… traefik won't do it, ambassador doesn't handle ALPS, grpc-proxy is almost perfect but it eats my authentication. Is @devsu actually using this, and do you intend to maintain it? Because I think it's a great addition to the scene, at least until such a time as something like Conduit matures.

@lalomartins
Copy link

lalomartins commented Feb 10, 2018

Okay, so here's some more info on it.

Proxying metadata used to work automatically. Then the go grpc implementation changed in (1.5 I think?) to separate incoming and outgoing contexts. Unfortunately, it doesn't seem the version in your public docker image works.

The grpc-proxy library is fixed to handle this. (As of this writing the issue is still open but the latest commit actually fixes it, or should.)

Here's an example of how one would use the new interface.

But I tried to apply the same to grpc-proxy and I get stream terminated by RST_STREAM with error code: INTERNAL_ERROR. You can see my code here in case it's useful.

@c3s4r
Copy link
Member

c3s4r commented Feb 14, 2018

Hi @lalomartins. Sorry, At devsu we're not using the project anymore, and don't have plans to use it in the near future. Because of that we cannot commit to maintain it... if anyone is interested in maintain it, feel free to make a fork and continue from there.

@lalomartins
Copy link

I figured as much. I ended up getting it to work using ingress-nghttpx. I'd be interested in hearing what you're using (if you're using anything).

Otherwise, might I suggest putting a banner on the readme or somewhere stating it's not maintained?

Thanks for the great work though!

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

No branches or pull requests

3 participants