IntersectMBO / cardano-db-sync

A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL
Apache License 2.0
290 stars 160 forks source link

Stuck at "epoch information not yet available. This is expected during the initial chain-sync" #1100

Closed PrernaPadhee closed 2 years ago

PrernaPadhee commented 2 years ago

OS Your OS: Ubuntu 18.04

Versions The db-sync version (eg cardano-db-sync --version): {CARDANO_DB_SYNC_VERSION:-12.0.0} PostgreSQL version: POSTGRES_VERSION:-11.5-alpine

Build/Install Method The method you use to build or install cardano-db-sync:

Run method The method you used to run cardano-db-sync (eg Nix/Docker/systemd/none): following docker-compose.yml used

version: "3.5"

services: postgres: image: postgres:${POSTGRES_VERSION:-11.5-alpine} environment:

secrets: postgres_db: file: ./placeholder-secrets/postgres_db postgres_password: file: ./placeholder-secrets/postgres_password postgres_user: file: ./placeholder-secrets/postgres_user volumes: db-sync-data: node-db: node-ipc: postgres-data:

Additional context Add any other context about the problem here.

Problem Report

{"name":"cardano-graphql","hostname":"fdb6e3bd2182","pid":1,"level":50,"msg":"Epoch information not yet available. This is expected during the initial chain-sync.","time":"2022-04-12T09:12:51.303Z","v":0}

PrernaPadhee commented 2 years ago

7 days since i setup the container and yet no epoch info is available. Used method A in the readme here -> https://github.com/input-output-hk/cardano-graphql/tree/6.2.0

erikd commented 2 years ago

This sounds like a cardano-graphql problem and cardano-graphql has its own repo.

From the incredibly brief description above, it seems like the cardano-node that cardano-db-sync is supposed to be connected to is not working. You need to find the logs for cardano-node and cardano-db-sync.

PrernaPadhee commented 2 years ago

graphql

i will move the issue to that repo

erikd commented 2 years ago

You also need to follow the following steps:

PrernaPadhee commented 2 years ago

You also need to follow the following steps:

  • Figure out if cardano-node is running and if it is in sync with the network.
  • Figure out if cardano-db-sync is running and is in sync with the node it is connecting to,

cardano-node logs

{"severity":"Info","timestamp":"2022-04-19T12:11:22.348023174Z","thread":"17","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2022-04-12T09:11:52.988619008Z","lastKnownTip":{"slot":58803990,"hash":"b1d13f6cd6aaaccc4cc7cead9a973466204d53cb5417b3a5eb00c00f5fea8122","blockNo":7143014},"lastTipUpdate":"2022-04-19T12:11:22.347860489Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":0,"totalConnections":0,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":3542,"gcCpuTime":667242377000,"cpuTime":3778491161900,"maxHeapSize":3542},"totalMessages":0}}}},"version":"v4.1.0"},
{"severity":"Info","timestamp":"2022-04-19T12:11:20.538434538Z","thread":"17","message":{"tag":"OgmiosHealth","healthCheck":{"tag":"HealthTick","status":{"startTime":"2022-04-12T09:11:52.988619008Z","lastKnownTip":{"slot":58803988,"hash":"ae71bacc9bf0bd892de72b604606a11b67ea2c8d62344776eba030570cd083d3","blockNo":7143013},"lastTipUpdate":"2022-04-19T12:11:20.538170814Z","networkSynchronization":0.99999,"currentEra":"Alonzo","metrics":{"activeConnections":0,"totalConnections":0,"totalUnrouted":0,"sessionDurations":{"mean":0,"min":0,"max":0},"runtimeStats":{"currentHeapSize":3542,"gcCpuTime":667232877800,"cpuTime":3778478972700,"maxHeapSize":3542},"totalMessages":0}}}},"version":"v4.1.0"},
[e63fcf60:cardano.node.ChainDB:Notice:35] [2022-04-19 12:11:22.34 UTC] Chain extended, new tip: b1d13f6cd6aaaccc4cc7cead9a973466204d53cb5417b3a5eb00c00f5fea8122 at slot 58803990

cardano-db-sync logs

[db-sync-node:Info:59] [2022-04-19 11:28:37.17 UTC] Offline pool metadata fetch: 46 results, 54 fetch errors,
[db-sync-node:Info:59] [2022-04-19 10:24:26.05 UTC] Offline pool metadata fetch: 44 results, 56 fetch errors,
[db-sync-node:Info:59] [2022-04-19 10:24:26.05 UTC] insertShelleyBlock(Alonzo): epoch 304, slot 46139657, block 6540000, hash 99fd37f68af8a989aa9a1e61b43315c865f0fcc69ee60f318d2e6b3cbd35a015,
[db-sync-node:Info:59] [2022-04-19 10:24:24.88 UTC] Removing valid files ["/var/lib/cdbsync/45729331-6d031e42c1.lstate"],
[db-sync-node:Info:59] [2022-04-19 10:24:24.87 UTC] Took a ledger snapshot at /var/lib/cdbsync/46139639-d45b35bc92.lstate,
[db-sync-node:Info:59] [2022-04-19 09:24:43.23 UTC] Offline pool metadata fetch: 49 results, 51 fetch errors,
[db-sync-node:Info:59] [2022-04-19 08:17:31.08 UTC] Offline pool metadata fetch: 49 results, 51 fetch errors,
[db-sync-node:Info:59] [2022-04-19 07:27:10.48 UTC] insertShelleyBlock(Alonzo): epoch 304, slot 46037331, block 6535000, hash 010256bc54c71974610e740fc01efbe2b6ee75f3f5ce8629755cb730d75941a5
erikd commented 2 years ago

If its syncing mainnet and its at epoch 304 then its not fully synced.

Are you running this on a system that meets the minimum system requirements? We have found that for instance, some Amazon AWS instances run really slowly because they have insufficient I/O bandwidth.

erikd commented 2 years ago

@PrernaPadhee is this sorted out yet? Can this ticket be closed?