How can I troubleshoot this? Docker instance insta...
# support-questions
w
How can I troubleshoot this? Docker instance instantly dissapppears after the command so I couldnt check the logs
p
Hi,
docker logs "name"
should work for stopped containers, also, you could try starting it without -d (so in non-detached mode)
w
Thank you so much, I am a noob with docker
Saw the error now
What caused the crash: Failed to initialize pool: FATAL: no pg_hba.conf entry for host "172.17.0.2", user "postgres", database "supertokens", SSL on
p
did you create the supertokens database? I forget that quite often 😄
w
Yes
And I can connect to it outside the docker
With the same host, dbname, user, pass I pass to docker
r
Can you show us the output of docker run command without the
-d
option?
what is your docker run command?
w
docker run \ -p 3567:3567 \ -e POSTGRESQL_USER="postgres" \ -e POSTGRESQL_HOST="192.168.1.16" \ -e POSTGRESQL_PORT="5432" \ -e POSTGRESQL_PASSWORD="testpw" \ -e POSTGRESQL_DATABASE_NAME="supertokens" \ registry.supertokens.io/supertokens/supertokens-postgresql
r
where does it get
172.17.0.2
from?
w
That is where I get confused
p
could you try it with
--network=host
?
w
It worked!
❤️
p
It's not a great solution but it works if you are just testing things out.
w
Yes, I am assuming this has to do with some local networking issues
I dont think I would need to use that argument with AWS RDS etc.
For production
r
which OS are you using btw?
w
Ubuntu
r
understood
p
I think the issue is that since the IP of the db server is on the local network, docker tries to map it to another docker container
w
Makes sense
Thank you so much for the support
6 Views