0

We've recently changed VPNs from OpenVPN to SoftEther; it's working great so far, with one exception: SQL Server Management Studio. For some reason, either SSMS or the SQL Server seems to drop the connection after a short amount of time (~30 seconds). Trying to run a query after that (even a simple SELECT) returns this:

SSMS "connection forcibly closed" message

Hitting F5 at that point re-establishes the connection and everything works OK...for another 30 seconds or so. Not a deal-breaker, but massively annoying if you're a DBA (like several of my users).

Everything else works fine over SoftEther: file + print, SSH/RDP sessions, MySQL Workbench, whatever. It just seems to be SSMS that doesn't like it, but I don't know why. The issue is common across all SQL Servers that I've tested it with; I've adjusted timeout/keepalive settings on the server and client, but nothing seems to have any effect. A packet trace of SQL Server traffic shows the server sending a RST after about 30 seconds:

SSMS Wireshark trace

(192.168.30.30 is my VPN IP, 172.16.1.132 is the SQL Server I'm testing with)

Does anyone have any idea how I might persuade this thing to stay connected? Angry DBAs are no fun to be around.

EDIT, in response to Greg's comment: traffic on the server shows no RST, just a FIN/ACK:

enter image description here

(150.150.10.39 is the LAN-side IP of the VPN server, which is NAT-ing my traffic)

Further updates, 14/3/22: Adjusting the MTU on the client, VPN server or SQL server appears to have no effect. What does have an effect is using DBeaver as the client instead of SSMS; that's rock-solid, with no timeouts or disconnections.

RainyRat
  • 3,730
  • 1
  • 24
  • 29
  • 1
    The server sent a RST because the client sent a RST. What does the packet capture on the SQL server side show? – Greg Askew Mar 07 '22 at 10:21
  • Good point; I've updated the question. – RainyRat Mar 07 '22 at 11:06
  • have you tried to lower the MTU size on your vpn server? I'm not sure but maybe the packet size which is getting used between SSMS and VPN Servers is getting higher than 1500, because of any encryption encapsulation. – Zareh Kasparian Mar 09 '22 at 16:11
  • I would be more interested in *what* is sending the RST to the client if the server is not sending the RST. – Greg Askew Mar 14 '22 at 13:27

0 Answers0