Hello, I’m trying to deploy a Keycloack server to fly.io using machines.
I’ve created a Postgres dev cluster and used the attach command to create a user and a database.
I set the environment variable KC_DB_URL
to the following:
jdbc:postgresql://top2.nearest.of.my-auth-pgql.internal:5432/my_auth
as well as KC_DB_USERNAME
and KC_DB_PASSWORD
accordingly to the provided credentials from the attach command.
I made sure both postgres and my keycloack server are in the same organization.
However when Keycloack starts up i get this error:
022-10-30T22:47:47.782 app[148e474fd77789] lhr [info] 2022-10-30 22:47:47,781 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-10-30T22:47:47.783 app[148e474fd77789] lhr [info] 2022-10-30 22:47:47,783 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection
2022-10-30T22:47:47.785 app[148e474fd77789] lhr [info] 2022-10-30 22:47:47,785 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: The connection attempt failed.
2022-10-30T22:47:47.786 app[148e474fd77789] lhr [info] 2022-10-30 22:47:47,786 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: top2.nearest.of.my-auth-pgql.internal
Caused by: java.net.UnknownHostException: top2.nearest.of.my-auth-pgql.internal
note that the important error is the last one:
Caused by: java.net.UnknownHostException: top2.nearest.of.my-auth-pgql.internal
which seems that jdbc or the fly machine is not able to resolve the host provided
Any help would be appreciated