Attempting to make a JDBC connection from client (Windows Server 2012) to server (MSSQL Server 2012 SP2 hosted on Windows Server) results in this error:
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=273; handshake=29736; (Microsoft SQL Server, Error: -2)
I have tried both on MS SQL Server Management Studio & using Squirrel SQL with different JDBC drivers, and still receive the same error. I can connect successfully to the server from other machines, and interestingly, I can connect from the client to the server successfully at the data link layer (tested using Data Link Editor). (Why would this be?)
Packet trace analysis (ran on both client and server simultaneously):
After the TCP handshake, the client sends a TDS pre-login packet to the server, but the server never receives the TDS pre-login packet. The client re-transmits and eventually the client sends a TCP reset to the server.
Additional details:
- Port 1433 is open on both the client and server.
- No network or software is filtering traffic from client to server.
- TCP/IP is enabled for IPv4 and IPv6 on both the client and server.
- TLS is enabled on both servers.
- Tracert from client to server completes successfully.
- We have tried modifying the connection string to force trust of the server certification, force encryption, increase connection timeout value to several minutes, etc.
- .NET 4.5 is used on the client, but .NET 4.5 is also used on other machines that can successfully connect to the server.
How can I troubleshoot why the pre-login message is not arriving at the server?