This was an interesting situation where I learned something new. In this blog we would learn about error – “A connection attempt failed because the connected party did not properly respond after a period of time.” while using “Azure Storage” option in SQL Server Management Studio.
As I wrote in my earlier blog, it is possible to connect to Storage Account using SQL Server Management Studio. Here is the link: SQL SERVER – Fix: 400 – Bad Request Authentication Failed for Account and the Provided Key. Please Provide a Valid Key and Try Again.
One of my blog readers sent an email with a different error.
Here is the text of the error message.
Unable to connect to the remote server (Microsoft.SqlServer.StorageClient)
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 52.239.220.32:443 (System)
In most of the situation, the above message comes due to the fact that the account which is opening SSMS is not able to reach to the storage account.
WORKAROUND/SOLUTION
There are few reasons which I could find.
- If this is a Virtual Machine in Azure, then check if Internet “outbound” is blocked on the server. Actually, to reproduce the error I blocked it.
- Check if there is any proxy server which is coming in between.
- Check for any possible firewall which is blocking connection to the storage account.
I always prefer to use Test-NetConnection to test connectivity to specific IP and Port. You can also use PSPing to achieve the same.
Test-NetConnection -ComputerName 52.239.220.32 -Port 443
False in “TcpTestSucceeded” means that traffic couldn’t make it to the destination. So, you might need to engage network expert and figure out what’s going on.
When I checked with my blog reader, he informed that it was an on-premise server and they identified that certain accounts were able to use a proxy (and hence reach to storage) and few accounts were not using a proxy and hence their request was failing.
After opening the direct communication to Azure storage, the issue was resolved for them.
Reference: Pinal Dave (https://blog.sqlauthority.com)
First appeared on SSMS – Azure Storage Error – A Connection Attempt Failed Because the Connected Party did not Properly Respond After a Period of Time