iSuperCoder opened a new issue #4691: URL: https://github.com/apache/apisix/issues/4691
### Issue description I'm researching apisix. Apisix-docker example in Mac Docker. The grpc-transcode plugin looks leaky. ### Environment * apisix version (cmd: `apisix version`):2.6 * OS (cmd: `uname -a`):linux/amd64 * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):openresty/1.19.3.1 * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):3.4.0 * apisix-dashboard version, if have:2.7 * luarocks version, if the issue is about installation (cmd: `luarocks --version`): ### Minimal test code / Steps to reproduce the issue 1.Create an upstream with follow settings: ```json { "nodes": [ { "host": "192.168.65.2", "port": 8888, "weight": 1 } ], "timeout": { "connect": 6, "read": 6, "send": 6 }, "type": "roundrobin", "scheme": "grpc", "pass_host": "pass", "name": "dmp" } ``` 2.Create a route,and enable grpc-transcode plugin ( The Proto named 1 is created by Admin-API, and My gRPC Service is available). ```json { "uris": [ "/*" ], "name": "dmp-api", "methods": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE" ], "hosts": [ "xxx.xxx.cn" ], "plugins": { "grpc-transcode": { "deadline": 10, "disable": false, "method": "query", "proto_id": 1, "service": "UnifiedUserService" } }, "upstream_id": "365483204003496641", "status": 1 } ``` 3.Send request ```shell curl --request POST \ --url http://127.0.0.1:9080/UnifiedUserService/query \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0IiwianRpIjoiYmNkM2I0ZjctOGJkOS00ZjliLWIzNDgtOTc5MGFkMjQxYjNiIiwiaWF0IjoxNjI3Mzc5NTY1fQ.VT_GfZ1vfSMzKam93ciDMMZQSkiedRuFUmm_opxKlgU' \ --header 'HOST: xxx.xxx.cn' \ --header 'appId: test' \ --data '{ "did":"c05a94deaad1f075b2ebb66b11ae078a" }' ``` ### What's the actual result? (including assertion message & call stack if applicable) I got a 502 error,Bad Gateway. Date: Wed, 28 Jul 2021 09:56:54 GMT Content-Type: text/html; charset=utf-8 Content-Length: 154 Connection: keep-alive Server: APISIX/2.6 X-APISIX-Upstream-Status: 502 Exception Info in gRPC Server: ``` 警告: Expected header TE: trailers, but null is received. This means some intermediate proxy may not support trailers 七月 28, 2021 5:12:04 下午 io.grpc.netty.NettyServerStream$TransportState deframeFailed 警告: Exception processing message io.grpc.StatusRuntimeException: INTERNAL: gRPC frame header malformed: reserved bits not zero at io.grpc.Status.asRuntimeException(Status.java:525) at io.grpc.internal.MessageDeframer.processHeader(MessageDeframer.java:381) at io.grpc.internal.MessageDeframer.deliver(MessageDeframer.java:271) at io.grpc.internal.MessageDeframer.deframe(MessageDeframer.java:177) at io.grpc.internal.AbstractStream$TransportState.deframe(AbstractStream.java:213) at io.grpc.internal.AbstractServerStream$TransportState.inboundDataReceived(AbstractServerStream.java:255) at io.grpc.netty.NettyServerStream$TransportState.inboundDataReceived(NettyServerStream.java:226) at io.grpc.netty.NettyServerHandler.onDataRead(NettyServerHandler.java:494) at io.grpc.netty.NettyServerHandler.access$800(NettyServerHandler.java:101) at io.grpc.netty.NettyServerHandler$FrameListener.onDataRead(NettyServerHandler.java:808) ...... ``` ### What's the expected result? Dont't trigger exception, and translate the response of gRPC service into json correctly . -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
