Connection to localhost:37273 refused

Hi,
My queries are all failing with this error:
Connection to localhost:37273 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

I’m using an SSH tunnel to connect to a postgreSQL DB behind a firewall. I got your IP addresses yesterday to whitelist and set up the connection yesterday and it worked fine then. I’m able to connect to my database using SSH tunnel from other tools.

I doubt you added an IP address since yesterday - but maybe that’s the issue? Or any other ideas?

Thanks!

Hi @uzAW
Can you provide a bit more information? Which IPs are you talking about? And where have you whitelisted them?

Post “Diagnostic Info” from Admin > Troubleshooting.
And more detailed errors should be available via Admin > Troubleshooting > Logs.

I'm doing a trial with your cloud solution. I got your IP addresses from your team as
18.207.81.126
3.211.20.157
50.17.234.169

which we added to our DB whitelist to permit your connection. All of this worked yesterday

I don't see a Troubleshooting menu in the Admin section.
On all of my charts, this is the error I see

@uzAW Okay, but you don’t need to whitelist access to your database if you are connecting through SSH.
Could it be that someone turned off the SSH access?

The Troubleshooting menu is in the top navigation bar, when you access the Admin page.

you’re right, sorry - we had to whitelist the IPs on the SSH host, not the DB itself (not elegant - we’re working on our set up :wink: ).

SSH access is working outside of Metabase. I’m tunneling in right now using DBeaver.

Diagnostic Info below
thanks!

{
“browser-info”: {
“language”: “en”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15”,
“vendor”: “Apple Computer, Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.10+9”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9”,
“os.name”: “Linux”,
“os.version”: “4.14.186-146.268.amzn2.x86_64”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“postgres”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “11.7”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.18”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-03-03”,
“tag”: “v1.38.1”,
“branch”: “release-x.38.x”,
“hash”: “79ef63a”
},
“settings”: {
“report-timezone”: null
}
}
}

@uzAW If you go to Admin > Databases > (your db) > and click Save - does the queries then work?

yup, after hitting save it magically now works!

Is this something that will keep happening? I’m under 24 hrs into my trial so trying to gauge if this was a one-off or if it’ll consistently be an issue

Thanks!

@uzAW I have a feeling that the tunnel somehow got closed and we have a fix for this in the upcoming version 0.39.0, but that’s probably a month or so away from release.
https://github.com/metabase/metabase/issues/10081

thanks!