We have a simple .NET 5 console app deployed in a Docker container. The app connects to SQL Server and does a simple SELECT * periodically (via Microsoft.Data.SqlClient.dll). The app is deployed in a cluster on Fargate (ECS). SQL Server is a mirrored setup, configured for automatic failover.
When we perform a manual failover of the database, a connection cannot be established to the database failover partner for some reason, and the application throws exceptions (System.Exception Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started). We have verified that SQL Server Browser is started, and all necessary protocols/ports are opened to allow network traffic to and from the database.
We have tried running this app/Docker container on an Amazon Linux 2 EC2 instance (which we assume is the underlying EC2 instance on top of which Fargate tasks run), and we have observed the same behaviour. However, we have also tried running this app/Docker container on a Ubuntu 18.04 EC2 instance, and we do not observe any errors - the app instantly connects to the database failover partner following a manual failover. Thus this appears to possibly be an issue with the underlying host OS.
Any help with this would be greatly appreciated.