Error when connecting to Azure SQL Database from Client

Laurence Mee 156 Reputation points
2020-06-06T01:16:13.587+00:00

This has just started happening, it was fine up until about an hour ago. Nothing was changed. Then suddenly I started getting the following error from SSMS:

===================================

Cannot connect to *****.database.windows.net.

===================================

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (.Net SqlClient Data Provider)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=10054&LinkId=20476


Server Name: *****.database.windows.net
Error Number: 10054
Severity: 20
State: 0


Program Location:

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

===================================

An existing connection was forcibly closed by the remote host

Azure SQL Database
{count} votes

9 answers

Sort by: Most helpful
  1. Ronen Ariely 15,081 Reputation points
    2020-06-06T02:17:41.247+00:00

    Good day all,

    I confirmed that there is probably an issue with the service at this time.

    I cannot connect to two of the Azure SQL logical Servers as well - both servers are in "West Europe"

    Please edit all your reports and add the information regarding which region are you using

    Update: Confirmed that in "East US" the service is OK.

    Update 06:47 IDT: I can connect from time to time. I try multiple times and sometime it works and someone not.

    2 people found this answer helpful.
    0 comments No comments

  2. Laurence Mee 156 Reputation points
    2020-06-06T14:01:34.853+00:00

    The issue appears to have been resolved in that for the last 4 hours I have been able to connect to the SQL Database from a client external to Azure. I will continue to monitor this.

    1 person found this answer helpful.
    0 comments No comments

  3. Yuji Masaoka 56 Reputation points
    2020-06-06T02:20:24.237+00:00

    Are you investigating the meaning of the error code "Error Number: 10054 Severity: 20 State: 0"?
    What about checking your Service Principal Name (SPN)?

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d87a4752-8ab9-4870-88e2-7b3b23805c00/microsoft-sql-server-error-10054-an-existing-connection-was-forcibly-closed-sql-server-2012?forum=sqldataaccess

    0 comments No comments

  4. Armand Brunelle 491 Reputation points
    2020-06-06T13:52:10.607+00:00

    Did you try the Hot Fix proposed here ?


  5. Navtej Singh Saini 4,216 Reputation points Microsoft Employee
    2020-06-08T02:03:41.053+00:00

    @Ronen Ariely - Thanks for responding on this and answering on other thread and your blog

    Thanks to @Laurence Mee and others who provided the confirmation for the resolution.,

    Everyone - As confirmed in above threads the issue is resolved. Also i have converted the answers to comments as applicable.

    If someone is still facing this issue, please get back to us on this thread and we will look into this further.

    Thanks
    Navtej S

    0 comments No comments