Can't add a database in SQL Server

Hi!

I am unable to add a database in SQL Server, and I don't understand why. I have checked connections, roles, and data, and when I click 'Save,' it only shows 'Failed' without providing the reason for the error.
failed

Has anyone experienced something similar and may have an idea on how to resolve this issue?

I am running Metabase (v0.48.3) in JAR (java.version 17.0.10), in Windows.

Thank you very much in advance.

Have you tried connecting to the database with the same credentials using a different third party tool like DataGrip or DB Beaver?

If it fails with that it might give you some more feedback as to what the specific problem is.

If it succeeds, you might be able to narrow it down to the networking from Metabase rather than the credentials themselves.

Check the server logs, it should give info about what's failing (Admin > Troubleshooting > Logs).

For instance, I can get that "Failed" response when I use a port that the SQL Server isn't listening on (123), and I get this error which shows me it's a connection timeout issue:

[14eff025-9a3a-4b39-9e0a-7e514f7e3eae] 2024-01-23T09:28:31+13:00 DEBUG metabase.server.middleware.log POST /api/database 400 20.0 s (0 DB calls) 
{:message
 "The TCP/IP connection to the host XXXX, port 123 has failed. Error: \"Connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.\"."}

My setup for a SQL connection running on the default instance listening on port 1433 looks like this:

Hope that helps.