Hi all,
I’m testing for the first time redash and I would like to use a postgres db.
If I make a shell connection like
psql myUser -h 127.0.0.1 -d myDb -p 5432
the connection is ok.
If I use redash whit the same parameters I have "Connection refused, Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432?.
Postgres runs on the same server of redash, but probably the error is to use 127.0.0.1 in redash configuration page.
What kind of tests can I do to check and solve my stupid connections problems?
@meghana (and others who might might end up here just as I did), just to reiterate and build on an earlier answer here, the issue is that Redash web instance does not see your localhost or 127.0.0.1 straight away.
This is because when running as a Docker container, the Redash server is a different host (i. e. not the same localhost as the Postgres server) from a network perspective.
The most convenient way is to set host.docker.internal as the host in the data source config; more info here and here.