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)
Packet trace analysis:
After the TCP handshake, the client sends a TDS pre-login packet to the server, but with the bytes representing the version all set to 0. The server doesn't respond (though the protocol indicates the server MUST respond in some way), so 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.
- Connectivity to the server is successful from other machines on different domains using the same connection string.
- Connectivity is successful from client to server at the data link layer (tested using Data Link Editor).
- TCP/IP is enabled for IPv4 and IPv6 on both the client and server.
- TLS is enabled on both servers.
- We have tried 3 different JDBC drivers using Squirrel SQL & MSSQL Server Management Studio. All provide the same error. The drivers refer to the correct DLLs.
- 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.
What could be the issue? I'm out of ideas.