Anyone else having trouble using Hybrid Connection Manager from a Linux App Service?

Bazul 1 Reputation point
2021-12-30T22:54:12.833+00:00

.NET Core 3.1 App->Update .NET 6 LTS

Windows App Service -> HCM -> Host (Win 2016 Standard, HCM v0.7.7 agent)-> SQL server

This works. We're using DNS name of SQL Server not IP, standard port 1433, I can ping SQL server. All documented troubleshooting steps confirmed on the host.
443 is open
Test-NetConnection <SQL Server DNS name> -P 1433 returns successful result.

Application code functions properly, connects and returns data from on-prem SQL server.


Linux App Service (using same code base ->Update .NET 6 LTS, same host and SQL server)

Does not work
We're using DNS name of SQL Server not IP, standard port 1433, I can ping SQL server from the host. All documented troubleshooting steps confirmed on the host.
443 is open
Test-NetConnection <SQL Server DNS name> -P 1433 returns successful result.

But the .NET app deployed to a Linux App Service spins, times out and eventually returns a HTTP ERROR 504 or throws a exception. Tried both machine name of SQL server as well as fully qualified name (both tcpping just fine) but the when run in a Linux based App Service can't connect.

Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 0xFFFDFFFF): Name or service not known

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,960 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.