cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
261 stars 103 forks source link

When I finished cardano-db-sync migration , Cardano-graphql logs show me some strange log. #763

Open yj0x0x opened 2 years ago

yj0x0x commented 2 years ago

Ask a question

inputoutput/cardano-graphql:7.0.0                                                                                                                          
inputoutput/cardano-graphql-hasura:7.0.0
cardanosolutions/ogmios:v5.2.0-mainnet
inputoutput/cardano-db-sync:13.0.4

Finished migration, and then I bump up cardano-graphql with restart.

then logs show me like below.

{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"ChainFollower","msg":"Rolling back to genesis","time":"2022-09-13T09:49:06.030Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"ChainFollower","msg":"Deleted 0 assets","time":"2022-09-13T09:49:06.041Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:49:27.640Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:49:46.122Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:49:59.442Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:50:20.682Z","v":0}
(node:1) UnhandledPromiseRejectionWarning: Error: database query error: {"response":{"errors":[{"extensions":{"path":"$","code":"unexpected"},"message":"database query error"}],"status":200},"request":{"query":"query {\n          epochs (limit: 1, order_by: { number: desc }) {\n              adaPots {\n                  reserves\n              }\n          }\n          rewards_aggregate {\n              aggregate {\n                  sum {\n                      amount\n                  }\n              }\n          }\n          utxos_aggregate {\n              aggregate {\n                  sum {\n                      value\n                  }\n              }\n          }\n          withdrawals_aggregate {\n              aggregate {\n                  sum {\n                      amount\n                  }\n              }\n          }\n      }"}}
    at GraphQLClient.<anonymous> (/app/node_modules/graphql-request/dist/index.js:170:35)
    at step (/app/node_modules/graphql-request/dist/index.js:63:23)
    at Object.next (/app/node_modules/graphql-request/dist/index.js:44:53)
    at fulfilled (/app/node_modules/graphql-request/dist/index.js:35:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:50:38.905Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:50:59.167Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:51:20.440Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:51:39.442Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:52:00.601Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:52:21.774Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:52:43.603Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:53:03.395Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:53:24.230Z","v":0}
{"name":"cardano-graphql","hostname":"14ce5486b14e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-09-13T09:53:45.979Z","v":0}
.............

Those are intended? Necessary to wait?

For the reference , my migration process like below.

rhyslbw commented 2 years ago

Is Hasura running? Please provide some logs from that container around the time of this error being triggered.

RdeWilde commented 2 years ago

Show your log from PostgreSQL. It should contain the query error