MSSQL Connection Timeout Expired (pre-login handshake failed or the server was unable to respond back in time)

If you happen to get this error (full error below):
TITLE: Connect to Server
——————————

Cannot connect to

——————————
ADDITIONAL INFORMATION:

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was – [Pre-Login] initialization=13472; handshake=14425; (Microsoft SQL Server, Error: -2)

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

——————————

The wait operation timed out

——————————
BUTTONS:

OK
——————————

What I did that helps me resolving the issue:
Enabling TCP/IP for both IP versions resolved the issue.
The fact that SSMS worked turned out to be coincidental (the first few attempts presumably used IPv4). Some later attempts to connect through SSMS resulted in the same error message.
To enable TCP/IP for additional IP addresses:
Start Sql Server Configuration Manager
Open the node SQL Server Network Configuration
Left-click Protocols for MYSQLINSTANCE
In the right-hand pane, right-click TCP/IP
Click Properties
Select the IP Addresses tab
For each listed IP address, ensure Active and Enabled are both Yes.

Help that helps!

1 thought on “MSSQL Connection Timeout Expired (pre-login handshake failed or the server was unable to respond back in time)

Leave a Reply

Your email address will not be published. Required fields are marked *