Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gRPC HelloWorldGreeter does not work on Fedora 35 #1629

Closed
Hjortsberg opened this issue Mar 7, 2022 · 2 comments
Closed

gRPC HelloWorldGreeter does not work on Fedora 35 #1629

Hjortsberg opened this issue Mar 7, 2022 · 2 comments
Labels
needs-author-feedback question Further information is requested

Comments

@Hjortsberg
Copy link

Hjortsberg commented Mar 7, 2022

Hi, I've been trying to dip my toes into gRPC on .Net and started by following this guide.
The server (greeter service) seems works just fine and I've done the process to trust dev certificates on Fedora which seems to work.

When running the client, I get the following exception:

Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. IOException: Cannot determine the frame size or a corrupted frame was received.", DebugException="System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
 ---> System.IO.IOException: Cannot determine the frame size or a corrupted frame was received.
   at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp2ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp2ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Grpc.Net.Client.Internal.GrpcCall`2.RunCall(HttpRequestMessage request, Nullable`1 timeout)")
   at Program.<Main>$(String[] args) in /home/Program.cs:line 9
   at Program.<Main>(String[] args)

Dotnet info gives:

dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

Runtime Environment:
 OS Name:     fedora
 OS Version:  35
 OS Platform: Linux
 RID:         fedora.35-x64
 Base Path:   /usr/lib64/dotnet/sdk/6.0.101/

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  3.1.416 [/usr/lib64/dotnet/sdk]
  5.0.206 [/usr/lib64/dotnet/sdk]
  6.0.101 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.22 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.1 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.22 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Is this some configuration error on my local machine or is this a bug with gRPC-dotnet on Fedora? :)

@Hjortsberg Hjortsberg added the question Further information is requested label Mar 7, 2022
@rafikiassumani-msft
Copy link

@Hjortsberg Do you mind confirming first that your dev cert is trusted for a non gRPC project? Something like Minimal API (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0)

@Hjortsberg
Copy link
Author

@rafikiassumani-msft Sorry to bother you, I went over my code once again and found that I had entered the wrong port of the server.
So in short https://localhost:<HttpPortnumber> instead of https://localhost:<HttpsPortnumber>.

Closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-feedback question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants