does your network support http2? not only does the client O/S and server O/S need to support, but any firewall or proxies between must also support http2.
gRPC connection error: "Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionExact while unable to establish HTTP/2 connection."
Eric Brandt
25
Reputation points
Hello! Can you suggest what might be the source (And remedy) for this error that occurs on certain PCs in our organization, but not others?
System.Exception: Unable to establish connection because Rpc error 'Internal': Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionExact while unable to establish HTTP/2 connection.", DebugException="System.Net.Http.HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionExact while unable to establish HTTP/2 connection.")
The only relevant related answer I found online was:
But it is a bit old, and perhaps a lot has changed since then. We are using .NET 8 and Grpc.Net.Client 2.66.0. We are using http://
(not https://
)
On the client side, the only thing we are doing before establishing connection is:
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
On the server side, this is the relevant server initialization (C++)
ServerBuilder builder;
builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
// ... continue with registering service, building, and starting
Any help you can provide in troubleshooting this issue would be appreciated. Thanks!