Create a VNet Rule on the Azure DB Server that allows access from the subnet the AKS nodes are in. This is used in conjunction with the Microsoft.Sql VNet Service Endpoint enabled on the cluster subnet. VNet Rules allows granting access to an entire subnet of AKS nodes.
cannot connect to azure sql database from AKS pod
under the firewall settings for the sql server, I have "Allow Azure services and resources to access this server" set to Yes, and added the vnet the cluster is on. is there a way to see what the problem with the connection is from the server side? logs view doesn't have any information.
Completed 500 Internal Server Error in 81ms (Allocations: 758)
F, [2021-10-28T20:16:43.601878 #1] FATAL -- : [fcf42f1ff0b473b9ec2e739afc2e9265]
[fcf42f1ff0b473b9ec2e739afc2e9265] ActiveRecord::ConnectionNotEstablished (server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
):
telnet shows 1433 open but the connection closes after a short moment. nslookup seems to show the dns resolving correctly too.
forgot to mention, it's a rails app if that provides any useful context. all db connection information from the env are confirmed to be what is intended
2 answers
Sort by: Most helpful
-
-
John Green 1 Reputation point
2021-10-29T05:45:10.673+00:00 I think my issue was assuming the Azure SQL database service was postgresql. Thanks regardless