Timeout during MSSQL setup

Hi folks, anyone have pointers on connecting Metabase jar connecting to a MS SQL server 2014 (14.0.1000.169). I’m sure there’s a simple step I’m missing? The metabase log display doesn’t provide anything helpful:

2021-01-24T09:08:20-05:00 ERROR metabase.driver.util Database connection error
java.util.concurrent.TimeoutException: Timed out after 5.0 s

I’ve tried connecting using both localhost and the IP address of the server where MetaBase and MS SQL are running, no luck.

I’ve tried using just the database name, and the “server name\database name” format, no luck.

I’m running SQL Server Manager on the same system and can look at and duplicate the database properties, but so far I can’t seem to make the connection.

Thanks for any suggestions.

Hi @bill.valaski
Post “Diagnostic Info” from Admin > Troubleshooting.
Depending on how you’re running Metabase, it’s most likely incorrect host/port or a firewall blocking.

“browser-info”: {
“language”: “en-US”,
“platform”: “Win32”,
“userAgent”: “Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36”,
“vendor”: “Google Inc.”
“system-info”: {
“file.encoding”: “Cp1252”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “”,
“os.name”: “Windows Server 2012 R2”,
“os.version”: “6.3”,
“user.language”: “en”,
“user.timezone”: “America/New_York”
“metabase-info”: {
“databases”: [],
“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”: “2020-12-03”,
“tag”: “v0.37.3”,
“branch”: “release-x.37.x”,
“hash”: “2f1e783”
“settings”: {
“report-timezone”: null

@bill.valaski It’s most likely because you are not using the correct host/port. Dynamic Ports on MSSQL can be tricky, so you might need to specify a port manually that Metabase can use.
You should migrate away from H2 if you’re using Metabase in production:
Latest release is 0.37.7

@flamber, yeah, right now I’m just trying to set this up for prelim testing so I’m making only enough changes to get connected. Do you have any other suggestions or tools for figuring out what connection settings I should use? Do I manually need to install the JDBC driver so that MetaBase connects with MS SQL, or is there a “built in” driver that is being used?


@bill.valaski Everything you need is built-in. I don’t know why it’s not working for you, but it must be something in your setup. You can try using another tool like DBeaver.io to test with.

@flamber thanks for you tips and suggestions. I found that the SQL server was using dynamic ports, and MetaBase just wouldn’t connect. Once I set the port number manually on the SQL Server and matched it within MB, connectivity was established.


1 Like