Sql-server – SQL Server connection fails over VPN

connectivityNetworksql server

I have an OpenVPN network consisting of VPN server (Linux), client (win8) and SQL Server (win 2008 server, SQL Server 2005), I'm trying to (of course) connect client to server.

When I try to connect using SQL Server Management Studio, it displays an odd error:

Connection Timeout Expired. The timeout period elapsed during the post-login phase.
The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to cre ate multiple active connections.
The duration spent while attempting to connect to this server was – [Pre-Login] initialization=580; handshake=865; [Login] ini tialization=0; authentication=2; [Post-Login] complete=58013;

The same happens when I try to connect from my (.NET) application – just hangs until the ConnectionTimeout has been reached throwing the same exception.

Curious thing is that I CAN successfully connect using sqlcmd from client and sqlsh+jTDS from OpenVPN server. Nothing shows up in SQL Server error logs or event log, netstat tells that the connection is in established state. Firewalls are off and I have tried every concise mix of connection string parameters, network parameters tweaking and still nothing. I have even tried bouncing the connection off a vpn server – same results.

Any ideas?

Best Answer

For a better analysis please provide a network dump (wireshark) from the client. A typical problem with vpn is ip fragmentation. This would explain the established state in netstat and that it is working with another client (which might using smaller packets). But without trace it is just a wild guess.