Connect to PostgreSQL after vanilla install


#1

Hello,

I am new to redash and Docker. So bare with me :slight_smile:
I installed redash using Docker. 5 docker images are created and running and I am able to connect to Redash using localhost:5000. When I try to connect to a postgresql it fails to find the host.

When I change the host to the IP-address of the database server it seems to find it but fails to authenticate for the defined user. And I am a 100% sure the password is ok.

Connecting to a URL is fine but not PostgreSQL. Anybody succeeded in connecting to a PostgreSQL DB server? Where to look for logging. I am not seeing any messages in the Docker images consoles. besides the following in the redash_server_1 image:

[2017-03-20 20:10:43,640][PID:13][INFO][metrics] method=POST path=/api/data_sources/1/test endpoint=datasourcetestresource status=200 content_type=application/json content_length=91 duration=93.17 query_count=4 query_duration=3.90[2017-03-20 20:10:44,561][PID:19][INFO][metrics] method=POST path=/api/events endpoint=events status=200 content_type=application/json content_length=4 duration=7.94 query_count=2 query_duration=2.26

Which for me is not really helpfull.

Any clues on how to analyze this (where to look). Thanks in advance

Jeroen


[DEV] Connect to PostgreSQL database on Docker host system
#2

Hi there, I suppose you configured pg_hba.conf file to allow remote access?
https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
http://www.thegeekstuff.com/2014/02/enable-remote-postgresql-connection/?utm_source=tuicool


#3

dncpax, thanks for your response.

That is on de PostgreSQL DB server I assume. I have no access to it to check but we are using this DB server from several other tools and connections are made without a problem. For the past 2 years โ€ฆ

I found that all my docker images use the local network and not bridge as I read is the default (docker network ls). And docker network inspect local is not working. docker network inspect bridge is showing the information for the bridge network but no containers are shown there while they are up and running. There is also no Gateway defined.

Maybe thatโ€™s an issue?


#4

Networking sounds like a possible issue indeed.


#5

Hi,

Did you figure out your issue? I seem to be having the exact same issue. Would love to hear how you went about solving this.

Thanks!

Adrian