Hello, I'm trying to run the supertools postgres d...
# support-questions
z
Hello, I'm trying to run the supertools postgres docker image for the first time locally to try out stuff. I get a message like this pretty early in the container logs:
Driver class org.postgresql.Driver not found in Thread context class loader jdk.internal.loader.ClassLoaders$AppClassLoader@942a29c, trying classloader java.net.URLClassLoader@6a024a67
Is this normal and I have some configuration error?
r
Hey! This is quite unusual. What is your docker compose file? Can you send it so i can try and replicate this?
z
I'm not using a compose file ATM, just running with
docker run
, see my message below for my arguments 🙂
r
Ah right. So is
host.docker.internal
getting resolved?
z
I tried resolving host.docker.internal from another container but that failed, maybe I'm donig something weird or my docker version is strange
r
I also just tried a similar command on my system right now and it worked:
Copy code
docker run --name supertokens -e POSTGRESQL_CONNECTION_URI="postgresql://root:root@192.168.1.18:5432/supertokens" registry.supertokens.io/supertokens/supertokens-postgresql
I think the issue might be to do with
host.docker.internal
part of the connection URI that you are giving.
z
thanks, i'm going to try a few things, maybe I need some networking flag to bridge the host's network
r
yea. Maybe. If you run into this issue again, maybe trying removing the image from your system and repulling it
z
https://stackoverflow.com/a/62431165 this seems to do the trick
thanks
r
ok great!
z
Copy code
docker run --name supertokens -e POSTGRESQL_CONNECTION_URI="postgresql://postgres:blablabla@host.docker.internal/supertokens" -d --add-host=host.docker.internal:host-gateway registry.supertokens.io/supertokens/supertokens-postgresql
I was initially thinking something is strange with the Java class loader, maybe some error message gets swallowed somewhere so we don't see a clear "can't resolve host"
r
Yeaaa. That is a bit strange indeed.
My guess is that the class that parses and connects to a connection URI tries to fine the right type of connector / driver based on the syntax of the provided string. And for the string you provided, it couldn’t find any such driver. Hence that error.