I am using Metabase with a PostgreSQL database on a host that only allows local database access, but I can SSH to the database server. Before Metabase supported SSH tunnels natively, I would manually create one before launching Metabase. For example:
All usernames and passwords are correct. When I try to save the database configuration, I get this error:
org.postgresql.util.PSQLException: Connection to remotehost.com:36683 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
It seems like after creating the tunnel, Metabase is trying to open the connection to the remote host when it should be opening a local connection (that then gets forwarded through the tunnel). Am I configuring this wrong?
I observe here the with a MySQL database. I see the following error message:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Which means essentially the same thing as you get with Postgresql. I see also in the log that a tunnel could be established: