I am trying to connect to an MS SQL Server database through DBeaver via an SSH tunnel but am getting the following error message when I "Test Connection...":

I/O Error: Connection reset
java.net.SocketException : Connection reset

enter image description here

If I set the Keep-Alive interval to anything other than 0, the error becomes the following:

Can't initialize tunnel
  Cannot establish tunnel
    com.jcraft.jsch.JSchException: timeout in waiting for rekeying process.

enter image description here

Looking at the debug log, ~/.dbeaver4/.metadata/dbeaver-debug.log, I see that the connection was initially successful but later reset. I don't believe it is a problem in my connection settings configuration (my colleages with Mac's connected successfully using the same settings)

Here's an excerpt from the dbeaver-debug.log:

2017-06-26 15:01:35.354 - Instantiate SSH tunnel
2017-06-26 15:01:35.355 - Connect to tunnel host
2017-06-26 15:01:35.356 - SSH INFO: Connecting to jdms.dssg.io port 22
2017-06-26 15:01:35.480 - SSH INFO: Connection established
2017-06-26 15:01:35.953 - SSH INFO: Authentication succeeded (publickey).
2017-06-26 15:01:36.083 - Connection failed (mssql-hashhashhash-hashhashhash)
2017-06-26 15:01:36.085 - SSH INFO: Disconnecting from jdms.dssg.io port 22
2017-06-26 15:01:36.086 - SSH INFO: Caught an exception, leaving main loop due to Socket closed
2017-06-26 15:01:36.135 - org.jkiss.dbeaver.model.exec.DBCConnectException: I/O Error: Connection reset
org.jkiss.dbeaver.model.exec.DBCConnectException: I/O Error: Connection reset
Caused by: java.sql.SQLException: I/O Error: Connection reset
Caused by: java.net.SocketException: Connection reset

Could this be a Linux specific issue?

How else can I debug my problem?

I am using DBeaver 4.0.8 to connect to a MS SQL Server database using the jTDS driver, in Ubuntu 16.04.

  • are you sure it is server_name.team_name.com and not the other way round team_name.server_name.com?
    – Jakuje
    Commented Jun 27, 2017 at 12:06
  • @Jakuje you are right but that filler-text is not meaningful here (it is correct in my true configuration)
    – yunque
    Commented Jun 27, 2017 at 16:47
  • If your coworker can connect to the exact same server with the exact same config using the exact same version of the app then it's probably related to your specific machine. Do you have some kind of layer 7 firewall, specific outbound firewalls, or any network protection/AV programs that might be causing an issue? Can you start with minimal daemons running? Commented Mar 28, 2018 at 17:34
  • It could be proxy issues. Not sure, but you can try this config: stackoverflow.com/a/76948786/6909832 Commented Aug 21, 2023 at 21:31

1 Answer 1


Try the JDBC driver or ODBC driver(Install/Config Info per platform) supplied by Microsoft for Linux clients. I've found that I'm often more successful when using the drivers provided by the vendor than those that are included with the product (e.g. in this case DBeaver). I would think all the other settings remain the same, just swap out the driver url to point the MS supplied driver instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.