Hi, I’ve been struggling trying to get database migration to work in Hydra. I’ve gone through the tutorials and can get everything working fine when configuring verbatim through the tutorial. What I’d like to do though is use a docker-compose file to pull all the pieces of hydra from docker hub, and will build our consent application separately.
I’ve modified the sample compose file from the git repository to pull images for postgresd:9.6 and oryd/hydra:latest (for hydra and hydra_migrate) before adding in the consent application. When running the migration, I’m getting an error I’ve seen around the forums, but don’t understand why I’m getting it. In the compose file, I have the same SYSTEM_SECRET in the environment section for both hydra-migrate, hydra, and postgresd. Below is the output:
postgresd_1 | LOG: database system was shut down at 2018-02-27 16:09:42 UTC
postgresd_1 | LOG: MultiXact member wraparound protections are now enabled
hydra-migrate_1 | time=“2018-02-27T16:11:07Z” level=info msg="Connecting with postgres://:@postgresd:5432/hydra?sslmode=disable"
postgresd_1 | LOG: database system is ready to accept connections
hydra-migrate_1 | time=“2018-02-27T16:11:07Z” level=info msg="Connected to SQL!"
hydra_1 | time=“2018-02-27T16:11:09Z” level=info msg="Connecting with postgres://:@postgresd:5432/hydra?sslmode=disable"
postgresd_1 | LOG: autovacuum launcher started
hydra-migrate_1 | Could not fetch signing key for OpenID Connect - did you forget to run “hydra migrate sql” or forget to set the SYSTEM_SECRET? Got error: pq: relation “hydra_jwk” does not exist
hydra_1 | time=“2018-02-27T16:11:09Z” level=info msg="Connected to SQL!"
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
hydra_1 | Could not fetch signing key for OpenID Connect - did you forget to run “hydra migrate sql” or forget to set the SYSTEM_SECRET? Got error: pq: relation “hydra_jwk” does not exist
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
postgresd_1 | ERROR: relation “hydra_jwk” does not exist at character 15
postgresd_1 | STATEMENT: SELECT * FROM hydra_jwk WHERE sid=$1 AND kid=$2
- Is it a bad idea to be trying to use hydra images that are prebuilt instead of building them on my system?
- If this is an acceptable approach, does anyone know what could possibly be misconfigured? I’ll share more details if needed.
Thanks for any suggestions.