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 Not connecting from CommandService #10

Open
kiranec opened this issue Apr 18, 2022 · 3 comments
Open

Grpc Not connecting from CommandService #10

kiranec opened this issue Apr 18, 2022 · 3 comments

Comments

@kiranec
Copy link

kiranec commented Apr 18, 2022

Building...
--> Calling GRPC Service https://localhost:5001
--> Couldnot call GRPC Server Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.", DebugException="System.Net.Http.HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.
at System.Net.Http.HttpConnectionPool.ThrowGetVersionException(HttpRequestMessage request, Int32 desiredVersion)
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.Balancer.Internal.BalancerHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Grpc.Net.Client.Internal.GrpcCall2.RunCall(HttpRequestMessage request, Nullable1 timeout)")
Seeding new platforms...
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at CommandsService.Data.PrepDb.SeedData(ICommandRepo repo, IEnumerable`1 platforms) in /Users/Project/PS/CommandsService/Data/PrepDb.cs:line 28
at CommandsService.Data.PrepDb.PrepPopulation(IApplicationBuilder applicationBuilder) in /Users/Project/PS/CommandsService/Data/PrepDb.cs:line 20
at Program.

$(String[] args) in /Users/Project/PS/CommandsService/Program.cs:line 55

@RyanAwareHQ
Copy link

Anyone have any updates on this? I am running on mac M1 and am facing the same issue.

@RyanAwareHQ
Copy link

I was able to resolve the issue by adding the following to appsettings.Development.json for the PlatformService: https://stackoverflow.com/a/70099900...

And then modifying appsettings.Development.json for the CommandService to "GrpcPlatform" : "http://localhost:5002". However, I feel like this could possibly be resolved in some other way.

@dolathanchuong
Copy link

dolathanchuong commented Oct 10, 2023

You Just Change Content in appsettings.json File IN PlatformService Project

from :
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": ""
}
to:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "
",
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http2"
}
}
}
And then modifying appsettings.Development.json for the CommandService to "GrpcPlatform" : "http://localhost:5002/".
Same Content In launchSettings.json In Properties Folder in CommandsService Project
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5009",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7059;http://localhost:5009",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants