SQLSERVER connects to PowerBI and DBeaver but not Metabase

I have just installed metabase and was testing the .jar file with SQL SERVER 2008 on my local network (i know it's old but can't do much about it).
I can successfully connect to it with PowerBI, DBeaver and Azure Data Studio. But I can't find a way to connect it in Metabase. It times out.

Connection with DBeaver

On PowerBI this works
image

Failed connection with Metabase

I tried with empty port and 1433
Tried with encrypt=false

diagnostics below

{
  "browser-info": {
    "language": "pt-BR",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "Cp1252",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "17.0.4.1+1",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "17.0.4.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "17.0.4.1+1",
    "os.name": "Windows 10",
    "os.version": "10.0",
    "user.language": "en",
    "user.timezone": "America/Cuiaba"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-12-07",
      "tag": "v0.45.1",
      "branch": "release-x.45.x",
      "hash": "019d31c"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

try leaving the port empty. Also, downgrade Java to version 11

tried downgrading to java 11 and didn't work
tried empty port, also didn't work

  "system-info": {
    "file.encoding": "Cp1252",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.17+8",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.17",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.17+8",
    "os.name": "Windows 10",
    "os.version": "10.0",
    "user.language": "en",
    "user.timezone": "America/Cuiaba"
  },

Thanks, if you’re using windows, have you checked the firewall already? Metabase should be allowed to have outbound connectivity

Tried disabling all firewalls and still no connection.
In other applications it just works...

Do I need to additional JDBC string options?
These are my connection settings on DBeaver tha works

I tried adding these but also didn't work

trustServerCertificate=true; encrypt=false;

#SOLVED

I gave up, downloaded Apache Superset and it just worked...

Then I tried a little more... I'm new to DBs and, as far as I know, mine uses dynamic ports but I tried the following

SELECT DISTINCT local_tcp_port FROM sys.dm_exec_connections WHERE local_tcp_port IS NOT NULL

I put the result port on Metabase connection form and FINALLY it didn't time out and gave usefull error message. TLS10 not accepted. I used the solution below

mattocchi
Jun '22
TLS10 can be disabled by default form Java Secuity configuration, if you are using Dockerized metabase you can re-enable TLS10 by:

docker exec -it metabase /bin/bash
than

cd /opt/java/openjdk/conf/security/
cp java.security java.security.bak #backup
vi java.security #edit and re-enable it removing form the configuration jdk.tls.disabledAlgorithms=
than you can restart Dockerized Metabase:

docker restart metabase

thanks for letting us know, remember that TLS 1.0 is deprecated as it's insecure for today's standards. I would recommend that you forcefully enable TLS 1.2+

Put the instance name in the 'Database instance name' box. Remove the instance name (SQLEXPRESS) from the host.
You should be able to leave the port empty.
Change the database name - you shouldn't be using 'Master'

With SQL Server, it's always easier to use a native connection or ODBC. In Metabase you can only use JDBC which is always more work.