You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/29 03:06:09 UTC

[GitHub] [apisix] tq0426w opened a new issue #6740: grpc-transcode+eureka, return 502

tq0426w opened a new issue #6740:
URL: https://github.com/apache/apisix/issues/6740


   ### Description
   
   use grpc-transcode, give ip:port, can proxy grpc protocol by http protocol.
   
   But when i use eureka as registry, i get 502 response.
   
   apisix error.log:
   
   2022/03/29 10:59:58 [error] 26592#26592: *58183 upstream prematurely closed connection while reading response header from upstream, client: 223.104.41.240, server: _, request: "GET /grpctest?name=mqtt HTTP/1.1", upstream: "grpc://172.17.77.181:58080", host: "121.43.113.62:9080"
   
   i'm not sure whether apisix can get right grpc port, because  the port 58080 in "grpc://172.17.77.181:58080" is http protocol port.
   
   how could i config to use grpc-transcode+eureka?
   
   ### Environment
   
   - APISIX version (2.13.0):
   - Operating system (Linux HOST099ECS 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux):
   - OpenResty / Nginx version (nginx version: openresty/1.19.9.1):
   
   


-- 
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] shuaijinchao commented on issue #6740: grpc-transcode+eureka, return 502

Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on issue #6740:
URL: https://github.com/apache/apisix/issues/6740#issuecomment-1082523021


   You can try to use the grpc client to simulate the current request to verify that the current upstream is valid.


-- 
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] soulbird commented on issue #6740: grpc-transcode+eureka, return 502

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #6740:
URL: https://github.com/apache/apisix/issues/6740#issuecomment-1081427075


   Please provide more information so that we can reproduce it, e.g: routes and upstream or any other...


-- 
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] tzssangglass commented on issue #6740: grpc-transcode+eureka, return 502

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6740:
URL: https://github.com/apache/apisix/issues/6740#issuecomment-1085612248


   > i modify discovery/eureka/init.lua code.
   > 
   > i find init.lua get port from eureka by "port" or "securePort" field. but when a gRPC server register on eureka, its gRPC port in metadata.gRPC_port.
   > 
   > so i add it.
   > 
   > now my grpc-transcode+eureka can work.
   
   Welcome to contribute PR


-- 
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] tq0426w commented on issue #6740: grpc-transcode+eureka, return 502

Posted by GitBox <gi...@apache.org>.
tq0426w commented on issue #6740:
URL: https://github.com/apache/apisix/issues/6740#issuecomment-1085493845


   i modify discovery/eureka/init.lua code.
   
   i find init.lua get port from eureka by "port" or "securePort" field.
   but when a gRPC server register on eureka, its gRPC port in metadata.gRPC_port.
   
   so i add it.
   
   now my grpc-transcode+eureka can work.


-- 
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] tzssangglass commented on issue #6740: grpc-transcode+eureka, return 502

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6740:
URL: https://github.com/apache/apisix/issues/6740#issuecomment-1081831494


   > upstream prematurely closed connection while reading response header from upstream
   
   this is usually a problem with upstream connections.
   
   > i'm not sure whether apisix can get right grpc port, because the port 58080 in "grpc://172.17.77.181:58080" is http protocol port.
   
   It is likely that your upstream service is registered in eureka with the http port, so APISIX got the http port.
   
   You can refer to this issue: https://github.com/apache/apisix/issues/5815 and this fix:https://github.com/apache/apisix/pull/5894, I think it's a similar problem.


-- 
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