Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After setup connection to local DBs fails #76

Open
leschiffres opened this issue Oct 4, 2024 · 1 comment
Open

After setup connection to local DBs fails #76

leschiffres opened this issue Oct 4, 2024 · 1 comment

Comments

@leschiffres
Copy link

I have set up locally a redash instance and I try to access my local postgres instances, but connection fails. However I can access these with the same credentials from my terminal. What do I need to do, to establish connection?

@justinclift
Copy link
Member

You'll need a few things for that to work, and it's pretty much the same list for any data source. 😄

  1. You'll need to know the correct IP address (or dns domain name or similar) for connecting to the database
  • This can sometimes be a bit tricky if your database is running locally and only listening on (say) "localhost", which Docker containers can't easily reach
  1. The data source (PostgreSQL in this instance) has to be actually listening on that IP address and not have anything blocking incoming connections from your source IP address
  • Default firewall settings can commonly need adjusting for this bit
  1. If the data source has its own security & authentication mechanisms, these have to be configured to allow access
  • PostgreSQL uses a text file (pg_hba.conf) to configure which IP addresses it'll allow connections from. Redash will generally give an error message with details about your source IP not being allowed when this is the problem. Generally it's not too hard to fix.

... and I'm pretty sure there's one more thing that's obvious which is not coming immediately to mind though. Hmmm, I probably need more coffee. 😉

Anyway, the above 3 should get you started in resolving the problem. If the connection is just timing out when it tries to connect, then it's probably either item 1 or 2 above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants