Unable to connect to .NET 7 GRPC service on running on Linux App Service

Joe Ourada 25 Reputation points
2023-01-30T05:06:21.61+00:00

I have a GRPC service written in .NET 7. It works without issue locally. To publish it to an app service, I followed the instructions at https://github.com/Azure/app-service-linux-docs/tree/master/HowTo/gRPC/.NET/.NET%207

It says it's working. I get the "endpoints must be made through a gRPC client" message if I try to connect with a browser, but connection times out when trying to connect with a test app. The test app gives this error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I've verified the http2 config settings in the general and app settings tab. Here's the log from the app. It just doesn't even seem to see the requests. This is what I see in the app logs.

2023-01-29T18:17:01.733963845Z ASP .NETCore Version: 7.0.1
2023-01-29T18:17:01.733967245Z Note: Any data outside '/home' is not persisted
2023-01-29T18:17:03.241488233Z Starting OpenBSD Secure Shell server: sshd.
2023-01-29T18:17:04.014288487Z Starting periodic command scheduler: cron.
2023-01-29T18:17:04.014985390Z Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll -bindPort 8080 -bindPort2 '8585' -userStartupCommand 'dotnet xxxx.GPRC.dll'
2023-01-29T18:17:04.050062623Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2023-01-29T18:17:04.050213924Z Could not find operation ID in manifest. Generating an operation id...
2023-01-29T18:17:04.065860784Z Build Operation ID: cdd5d762-16a5-472f-95d6-66f214b4ff3d
2023-01-29T18:17:04.404195874Z
2023-01-29T18:17:04.412895908Z Agent extension
2023-01-29T18:17:04.412916008Z Before if loop >> DotNet Runtime
2023-01-29T18:17:04.548230524Z DotNet Runtime 7.0Writing output script to '/opt/startup/startup.sh'
2023-01-29T18:17:04.659425648Z Running user provided startup command...
2023-01-29T18:17:06.958777305Z warn: Microsoft.AspNetCore.Server.Kestrel[0]
2023-01-29T18:17:06.958826705Z Overriding address(es) 'http://*:8080'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
2023-01-29T18:17:07.090840333Z info: Microsoft.Hosting.Lifetime[14]
2023-01-29T18:17:07.090875033Z Now listening on: http://[::]:8080
2023-01-29T18:17:07.090881133Z info: Microsoft.Hosting.Lifetime[14]
2023-01-29T18:17:07.090885633Z Now listening on: http://[::]:8585
2023-01-29T18:17:07.090889833Z info: Microsoft.Hosting.Lifetime[0]
2023-01-29T18:17:07.090894133Z Application started. Press Ctrl+C to shut down.
2023-01-29T18:17:07.090898433Z info: Microsoft.Hosting.Lifetime[0]
2023-01-29T18:17:07.090902633Z Hosting environment: Production
2023-01-29T18:17:07.090907033Z info: Microsoft.Hosting.Lifetime[0]
2023-01-29T18:17:07.090911033Z Content root path: /home/site/wwwroot

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,161 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,874 questions
{count} vote

Accepted answer
  1. Grmacjon-MSFT 15,856 Reputation points
    2023-04-12T17:46:15.7+00:00

    Hi @Joe Ourada Apologies for the delayed response. There was a known issue with .NET 7 GRPC service which has now been resolved. Please refer to this updated document:https://github.com/Azure/app-service-linux-docs/blob/master/HowTo/gRPC/use_gRPC_with_dotnet.md Thanks, Grace

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful