Open jonathangenlambda opened 2 years ago
This should work, but I wouldn't expect it to split across docker-compose
files given you'd be creating two networks. Why not just add it to the same compose file?
Added to the same compose file, now running into different issue:
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":50,"err":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"172.18.0.6","port":5432},"msg":"connect ECONNREFUSED 172.18.0.6:5432","time":"2022-07-11T11:16:43.877Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":40,"module":"Db","msg":"pgSubscriber: Reconnecting attempt 1","time":"2022-07-11T11:16:43.879Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":40,"module":"Db","msg":"pgSubscriber: Reconnecting attempt 2","time":"2022-07-11T11:16:44.417Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":40,"module":"Db","msg":"pgSubscriber: Reconnecting attempt 3","time":"2022-07-11T11:16:44.919Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"Db","msg":"pgSubscriber: Connected","time":"2022-07-11T11:16:44.963Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-11T11:16:44.963Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-11T11:16:45.088Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"{\"level\":\"info\",\"msg\":\"Help us improve Hasura! The cli collects anonymized usage stats which\\nallow us to keep improving Hasura at warp speed. To opt-out or read more,\\nvisit https://hasura.io/docs/1.0/graphql/manual/guides/telemetry.html\\n\",\"time\":\"2022-07-11T11:16:45Z\"}\n","time":"2022-07-11T11:16:46.344Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Applying PostgreSQL schema migrations: Attempt 1 of 10, retrying...","time":"2022-07-11T11:16:46.344Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"{\"level\":\"info\",\"msg\":\"Applying migrations...\",\"time\":\"2022-07-11T11:16:47Z\"}\n{\"level\":\"info\",\"msg\":\"nothing to apply\",\"time\":\"2022-07-11T11:16:47Z\"}\n","time":"2022-07-11T11:16:47.501Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"{\"level\":\"info\",\"msg\":\"Applying migrations...\",\"time\":\"2022-07-11T11:16:47Z\"}\n{\"level\":\"info\",\"msg\":\"migrations applied\",\"time\":\"2022-07-11T11:16:47Z\"}\n","time":"2022-07-11T11:16:47.720Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"{\"level\":\"info\",\"msg\":\"Clearing metadata...\",\"time\":\"2022-07-11T11:16:47Z\"}\n{\"level\":\"info\",\"msg\":\"Metadata cleared\",\"time\":\"2022-07-11T11:16:47Z\"}\n","time":"2022-07-11T11:16:47.857Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"{\"level\":\"info\",\"msg\":\"Applying metadata...\",\"time\":\"2022-07-11T11:16:47Z\"}\n{\"level\":\"info\",\"msg\":\"Installing plugin cli-ext...\",\"time\":\"2022-07-11T11:16:48Z\"}\n{\"level\":\"info\",\"msg\":\"plugin installed\",\"name\":\"cli-ext\",\"time\":\"2022-07-11T11:16:52Z\"}\n{\"level\":\"info\",\"msg\":\"Metadata applied\",\"time\":\"2022-07-11T11:16:52Z\"}\n","time":"2022-07-11T11:16:52.646Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"graphql-engine setup","time":"2022-07-11T11:16:52.883Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:52.888Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 1 of 101, retrying...","time":"2022-07-11T11:16:52.888Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:53.894Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 2 of 101, retrying...","time":"2022-07-11T11:16:53.894Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:54.950Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 3 of 101, retrying...","time":"2022-07-11T11:16:54.950Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:56.057Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 4 of 101, retrying...","time":"2022-07-11T11:16:56.057Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:57.220Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 5 of 101, retrying...","time":"2022-07-11T11:16:57.220Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:58.441Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 6 of 101, retrying...","time":"2022-07-11T11:16:58.441Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:16:59.723Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 7 of 101, retrying...","time":"2022-07-11T11:16:59.723Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:01.066Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 8 of 101, retrying...","time":"2022-07-11T11:17:01.066Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:02.479Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 9 of 101, retrying...","time":"2022-07-11T11:17:02.479Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:03.962Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 10 of 101, retrying...","time":"2022-07-11T11:17:03.962Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:05.518Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 11 of 101, retrying...","time":"2022-07-11T11:17:05.518Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:07.151Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 12 of 101, retrying...","time":"2022-07-11T11:17:07.151Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:08.866Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 13 of 101, retrying...","time":"2022-07-11T11:17:08.866Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:10.666Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 14 of 101, retrying...","time":"2022-07-11T11:17:10.666Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:12.556Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 15 of 101, retrying...","time":"2022-07-11T11:17:12.556Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:14.540Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 16 of 101, retrying...","time":"2022-07-11T11:17:14.540Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:16.625Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"msg":"Detecting DB sync state has reached minimum progress: Attempt 17 of 101, retrying...","time":"2022-07-11T11:17:16.625Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"DB sync state has reached minimum progress","time":"2022-07-11T11:17:18.814Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":20,"module":"HasuraClient","msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:18.820Z","v":0}
{"name":"cardano-graphql","hostname":"6f2c6a0b526e","pid":1,"level":50,"msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-07-11T11:17:18.820Z","v":0}
It seems that graphql just "gives up" after Attempt 17 of 101, instead of keep trying. The solution was to really start hasura and graphql "later", that is after the testnet has started to produce a few blocks (~50). We start hasura and graphql in a separate docker-compose file, which works just fine.
In this process we also have switched to cardano-node/cli version 1.35 and bumped the versions of the services accordingly:
Note that in our private testnet we are bootstrapping into Babbage from epoch 0, as defined in configuration.yml:
TestShelleyHardForkAtEpoch: 0
TestAllegraHardForkAtEpoch: 0
TestMaryHardForkAtEpoch: 0
TestAlonzoHardForkAtEpoch: 0
TestBabbageHardForkAtEpoch: 0
Summary
We have a private testnet up and running, with cardano-node, cardano-ogmios, postgres and cardano-db-sync successfully connected and everything works fine.
Now we want to bring in cardano-graphql but we seem not to get it working. Here is the docker-compose.yml (note that we have to use cardano-db-sync:master otherwise cardano-db-sync would fail to sync with the private testnet which bootstraps into alonzo from block 0):
When all services are up and running and the socket files of the private testnet nodes are exposed, we are firing up cardano-graphql with another docker-compose:
When cardano-graphql starts we see the following output:
This continues until Attempt 10 of 10 followed by a final error output:
Steps to reproduce the bug
No response
Actual Result
See summary description.
Expected Result
Expected is that cardano-graphql gets up and running without errors and that we can connect to it through http://localhost:3100/graphql.
Environment
Using environment as specified in the docker-compose in the Summary.
cardano-node --version: cardano-node 1.34.0 - linux-x86_64 - ghc-8.10 git rev c23d5d319cd3276575c6ac32458516232e8d2c48
cardano-db-sync --version: cardano-db-sync 12.0.1 - linux-x86_64 - ghc-8.10 git revision 6af53927161a3914598491de6c650da96f3c8c09
Platform
Platform version
Ubuntu 22.04
Runtime
Runtime version
No response