-
Notifications
You must be signed in to change notification settings - Fork 11.1k
gRPC call hangs on Linux x64 in Azure Functions host #25208
Copy link
Copy link
Closed
Description
What version of gRPC and what language are you using?
gRPC 2.34.1, using .NET Core 3.1.
What operating system (Linux, Windows,...) and version?
Linux and Windows
What runtime / compiler are you using (e.g. python version or version of gcc)
.NET Core SDK 3.1, with the azure-functions-core-tools-3 version 3.0.3160-1
What did you do?
- Start an Azure function that uses gRPC to make a request, running under Linux.
- Invoke the function
- Function hangs
Zip file everything to reproduce using Docker: repro.zip
docker build -t grpc-reprodocker run -p 7071:7071 -it grpc-reprofunc start(and wait for the console to show that it's started)- Browse to http://localhost:7071/api/TestFunction
This is the code that makes the request - it's not expected to work, just exercise gRPC:
private static string MakeRequest()
{
var marshaller = new Marshaller<string>(Encoding.UTF8.GetBytes, Encoding.UTF8.GetString);
var method = new Method<string, string>(MethodType.Unary,
"test-service", "test-method",
marshaller, marshaller);
var channel = new Channel("spanner.googleapis.com:443", ChannelCredentials.Insecure);
var callInvoker = channel.CreateCallInvoker();
return callInvoker.BlockingUnaryCall(method, "spanner.googleapis.com", new CallOptions(), "request");
}What did you expect to see?
An error of "StatusCode="Unavailable", Detail="failed to connect to all addresses"" due to making a bogus request (deliberately).
What did you see instead?
The function hangs.
Anything else we should know about your project / environment?
- The same code "fails correctly" when running in Windows in the Azure Functions host
- The same code "fails correctly" when running in Linux as a console application
- Using an async call doesn't help
- Real (correct) RPCs fail in the same way
Reactions are currently unavailable