gRPC connection fails on TLS handshake

The connection with a esdb://my.host:2113?tls=true fails with the message: “Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception” and the deepest inner exception is a Win32Exception (0x80090367): No common application protocol exists between the client and the server. Application protocol negotiation failed."

I’m not sure if this is a problem with the client or the server, and if this is the right place for this question, or if this is a gRPC bug or even lower level bug…

I did a network capture and found the server is rejecting the Client Hello with a “No application Protocol (120)”. It does so with a TLS 1.2 record. I compared it to a Client Hello for a curl POST request on https://my.host:2113/admin/scavenge

There’s 2 things I noticed:

  1. There is no supported_version extension
  2. The only ALPN Protocol is h2, whereas in the curl request, there is also a http/1.1 protocol

Notes:

  • I’m hitting a single node server, version 21.6.0.0 on Windows
  • The client is .NET 6 preview app, also running on Windows, using Grpc.Net.Client 2.38.0 / 2.39.0-pre1 (tried with both)

I googled it quickly and it seems to be an issue on Windows when using the C++ gRPC client wrapper with earlier .NET versions as well, and it seems to be environment-specific. But we use Grpc.Net.Client, which uses HttpClient… Still, the issue might be caused by the environment setup.

1 Like