-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Description
I use apisix for grpc proxy。I use a custom lua plugin to process the request,when some request param not right,i return code like:
core.response.add_header("Content-Type", "application/grpc")
core.response.add_header("grpc-status", "16")
core.response.add_header("grpc-message", "UNAUTHENTICATED")
return 200and I use a grpc tool "bloom-rpc" to debug the request,then the "bloom-rpc" return like
"error": "2 UNKNOWN: No status received"
and I tried golang client to debug,it returns err server closed the stream without sending trailers。
I don't know why,and i debuged a whole day。。。
and when i set the status code 200 -> 599,it worked。。
so i what know why?
and another question,it works well in kong the code like that
return kong.response.exit(200, nil, {
["Content-Type"] = "application/grpc",
["grpc-status"] = 16,
["grpc-message"] = "UNAUTHENTICATED"
})Hope the answer! Thanks very well!
Environment
- APISIX version (run
apisix version):2.13 - Operating system (run
uname -a):centos os 7.9 - OpenResty / Nginx version (run
openresty -Vornginx -V): - etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): - APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):