I have a Python gRPC server running on AWS Fargate (configured very similar to this AWS guide here), and another AWS Fargate task (call it the "client") that attempts to make a connection to my gRPC server (also using Python gRPC). However, the client is unable to make a call to my server, with the following error:
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1619057124.216955000","description":"Failed to pick subchannel",
"file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":5397,
"referenced_errors":[{"created":"@1619057124.216950000","description":"failed to connect to all addresses",
"file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc",
"file_line":398,"grpc_status":14}]}"
Based on my reading online, it seems like there are myriad situations in which this error is thrown, and I'm having trouble figuring out which one pertains to my case. Here is some additional information:
- When running client and server locally, I am able to successfully connect by having the client connect to
localhost:[PORT]
- I have configured an application load balancer target group following the guide from AWS here that makes health check requests to the
/
route of my gRPC server, using the gRPC protocol, and expect gRPC response code 12 (UNIMPLEMENTED
); these health check requests are coming back as expected, which I believe implies the load balancer is able to successfully communicate with the server (although I could be misunderstanding) - I configured a service discovery system (following this guide here) that should allow me to reach my gRPC server within my VPC via the name
service-name.dev.co.local
. I can confirm that the corresponding DNS record exists in Route 53, and when I SSH into my VPC, I am indeed able to pingservice-name.dev.co.local
successfully.
Anyone have any ideas? Would appreciate any and all advice, and I'm happy to answer any further questions.
Thank you for your help!