-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Open
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcgrpc/subsvc
Description
Description
The documentation is very helpful, but it can easily lead to the following exception:
System.InvalidOperationException: Channel is configured with an HTTP transport doesn't support client-side load balancing or connectivity state tracking. The underlying HTTP transport must be a SocketsHttpHandler with no SocketsHttpHandler.ConnectCallback configured. The HTTP transport must be configured on the channel using GrpcChannelOptions.HttpHandler.
at Grpc.Net.Client.GrpcChannel.ValidateHttpHandlerSupportsConnectivity() in /_/src/Grpc.Net.Client/GrpcChannel.cs:line 427
at Grpc.Net.Client.GrpcChannel..ctor(Uri address, GrpcChannelOptions channelOptions) in /_/src/Grpc.Net.Client/GrpcChannel.cs:line 131
at Grpc.Net.Client.GrpcChannel.ForAddress(Uri address, GrpcChannelOptions channelOptions) in /_/src/Grpc.Net.Client/GrpcChannel.cs:line 708
at Grpc.Net.Client.GrpcChannel.ForAddress(String address, GrpcChannelOptions channelOptions) in /_/src/Grpc.Net.Client/GrpcChannel.cs:line 678
Based on various existence of ValidateHttpHandlerSupportsConnectivity
for example here : https://github.com/grpc/grpc-dotnet/blob/f31cd71abfc0e8a8a7b93f447868405b0baebed0/src/Grpc.Net.Client/GrpcChannel.cs#L138C1-L139C1, one needs to make sure:
- ServiceConfig?.LoadBalancingConfigs can't exist
- Neither
ConnectivityState
norWaitForStateChangedAsync
can be invoked.
I think we need to clarify this in the documentation.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/grpc/interprocess-uds?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/grpc/interprocess-uds.md
Document ID
9af2ca8f-eefb-ae3d-ba52-d6b2a826945d
Platform Id
52d86246-3466-b842-2ee0-35cdd744c0c4
Article author
Metadata
- ID: 9af2ca8f-eefb-ae3d-ba52-d6b2a826945d
- PlatformId: 52d86246-3466-b842-2ee0-35cdd744c0c4
- Service: aspnet-core
- Sub-service: grpc
Metadata
Metadata
Assignees
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcgrpc/subsvc