Cannot connect to Azure SQL server

KH2437 0 Reputation points
2025-06-17T19:35:34.3766667+00:00

This morning, we were unable to connect to two of our azure sql servers (UAT and Prod) from an on prem VM, yet we could connect to our 3rd server (DEV). UAT and DEV are on the same subscription in Azure while prod is on a separate sub. Access is restricted to the same set of IP addresses for all, yet when we try to connect via SSMS or directly on the portal through Query editor (preview), it is gives the same error!

Connecting with User's image

User's image

We've checked with our network team and they said 1433 is not being blocked on the permitter firewall. However, we get the following failure only from this VM. What we can't figure out is why it works for DEV and not for UAT. The remote IP is different but we don't have any rule for these IP addresses in our internal firewalls. Also, these remote IP addresses appear to change and belong to a gateway I think

User's image

User's image

This happened with what believe were no changes put through on the client side. Does anyone have any ideas on how we could trouble shoot this down?

Thanks in advance for any help.

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2025-06-17T21:06:27.15+00:00

    Some googling on the essential part, An attempt to access a socket in a way forbidden by its access permissions, suggest that this is a general networking error caused by some sort of conflict with another program. That is, it is a issue within the VM. In the StackOverflow thread https://stackoverflow.com/questions/10461257/an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissi there are several suggestions of things to try.


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.