You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "AstarLight (via GitHub)" <gi...@apache.org> on 2023/03/16 03:16:25 UTC
[GitHub] [apisix] AstarLight opened a new issue, #9079: bug: grpc-transcode not support python server
AstarLight opened a new issue, #9079:
URL: https://github.com/apache/apisix/issues/9079
### Current Behavior
when using grpc-transcodeļ¼errors happen.
root@DESKTOP-32INF72:~/go/bin# curl -i http://127.0.0.1:9080/grpctest\?name=world
HTTP/1.1 500 Internal Server Error
Date: Thu, 16 Mar 2023 02:40:10 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
grpc-status: 2
grpc-message: Missing :te header
Server: APISIX/3.1.0
### Expected Behavior
curl -i http://127.0.0.1:9080/grpctest\?name=world
HTTP/1.1 200 OK
Date: Mon, 27 Dec 2021 06:24:47 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/2.11.0
Trailer: grpc-status
Trailer: grpc-message
{"message":"Hello world"}
grpc-status: 0
grpc-message:
### Error Logs
see http resopnse header
HTTP/1.1 500 Internal Server Error
Date: Thu, 16 Mar 2023 02:40:10 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
grpc-status: 2
grpc-message: Missing :te header
Server: APISIX/3.1.0
### Steps to Reproduce
1. run apisx from official 3.10 image
2. run python server. this is grpc official code.
`
from concurrent import futures
import logging
import grpc
from grpc_reflection.v1alpha import reflection
import helloworld_pb2
import helloworld_pb2_grpc
class Greeter(helloworld_pb2_grpc.GreeterServicer):
def SayHello(self, request, context):
return helloworld_pb2.HelloReply(message='Hello, %s!' % request.name)
def serve():
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
helloworld_pb2_grpc.add_GreeterServicer_to_server(Greeter(), server)
SERVICE_NAMES = (
helloworld_pb2.DESCRIPTOR.services_by_name['Greeter'].full_name,
reflection.SERVICE_NAME,
)
reflection.enable_server_reflection(SERVICE_NAMES, server)
server.add_insecure_port('[::]:50052')
server.start()
server.wait_for_termination()
if __name__ == '__main__':
logging.basicConfig()
serve()
`
3. config apisix
`
{
"uri": "/grpctest",
"name": "test-grpc",
"methods": [
"GET"
],
"plugins": {
"grpc-transcode": {
"_meta": {
"disable": false
},
"method": "SayHello",
"proto_id": "2",
"service": "helloworld.Greeter"
}
},
"upstream": {
"nodes": [
{
"host": "172.26.46.110",
"port": 50052,
"weight": 1
}
],
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"scheme": "grpc",
"pass_host": "pass",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
}
},
"status": 1
}
`
4. curl -i http://127.0.0.1:9080/grpctest\?name=world
### Environment
- APISIX version (run `apisix version`):3.1.0
- Operating system (run `uname -a`): Linux DESKTOP-32INF72 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
- OpenResty / Nginx version (run `openresty -V` or `nginx -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: grpc-transcode
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] AstarLight commented on issue #9079: bug: grpc-transcode not support python server
Posted by "AstarLight (via GitHub)" <gi...@apache.org>.
AstarLight commented on issue #9079:
URL: https://github.com/apache/apisix/issues/9079#issuecomment-1471266413
I use grpcurl to ensure my python server works normally.
```
root@DESKTOP-32INF72:~/go/bin# ./grpcurl -d '{"name": "zhangsan"}' -plaintext 172.26.46.110:50052 helloworld.Greeter.SayHello
{
"message": "Hello, zhangsan!"
}
```
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] shreemaan-abhishek commented on issue #9079: bug: grpc-transcode not support python server
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9079:
URL: https://github.com/apache/apisix/issues/9079#issuecomment-1532452706
Can we close this since #9312 has been merged?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] kingluo closed issue #9079: bug: grpc-transcode not support python server
Posted by "kingluo (via GitHub)" <gi...@apache.org>.
kingluo closed issue #9079: bug: grpc-transcode not support python server
URL: https://github.com/apache/apisix/issues/9079
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org