cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

curl localhost:3100/graphql -> curl: (56) Recv failure: Connection reset by peer #743

Open jcfd3 opened 2 years ago

jcfd3 commented 2 years ago

Summary

Fully synced Cardano-DB-Sync however I've been getting this error ever since I started using GraphQL. I've never been able to check the sync status of DB-Sync with https://github.com/input-output-hk/cardano-graphql#check-cardano-db-sync-progress either.

Steps to reproduce the bug

Running this docker-compose.yml with sudo docker-compose up -d

version: "3.5"

services:
  postgres:
    image: postgres:${POSTGRES_VERSION:-11.5-alpine}
    environment:
      - POSTGRES_LOGGING=true
      - POSTGRES_DB_FILE=/run/secrets/postgres_db
      - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
      - POSTGRES_USER_FILE=/run/secrets/postgres_user
    ports:
      - ${POSTGRES_PORT:-5432}:5432
    secrets:
      - postgres_db
      - postgres_password
      - postgres_user
    shm_size: '2gb'
    volumes:
      # - postgres-data:/var/lib/postgresql/data
      - /home/ubuntu/adadata/postgres2:/var/lib/postgresql/data
    restart: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

# Removing this service and separating them (so I know exactly where the data is going and the mounted volumes)
  # cardano-node-ogmios:
  #   build:
  #     args:
  #       - NETWORK=${NETWORK:-mainnet}
  #     cache_from: [ cardanosolutions/cardano-node-ogmios:latest ]
  #     context: ./ogmios
  #   image: cardanosolutions/cardano-node-ogmios:${CARDANO_NODE_OGMIOS_VERSION:-v5.1.0}-${NETWORK:-mainnet}
  #   logging:
  #     driver: "json-file"
  #     options:
  #       max-size: "400k"
  #       max-file: "20"
  #   ports:
  #     - ${OGMIOS_PORT:-1337}:1337
  #   restart: on-failure
  #   volumes:
  #     # - node-db:/db
  #     # - node-ipc:/ipc
  #     - /home/ubuntu/adadata:/mount

# MUST adjust the config.json to expose Prom Metrics! (All of the containers use the same default 'mainnet', and this has 'cardano-node' as well.
  cardano-node:
    image: inputoutput/cardano-node:${CARDANO_NODE_VERSION:-1.35.0}
#     environment:
#       - NETWORK=${NETWORK:-mainnet}
    command: [
      "run",
      "--config", "/config/config.json",
      "--database-path", "/mount/db2",
      "--socket-path", "/mount/ipc/node.socket",
      "--topology", "/config/topology.json",
      "--port", "3001"
    ]
    volumes:
      - ./ogmios/server/config/network/${NETWORK:-mainnet}/cardano-node:/config
      - ./ogmios/server/config/network/${NETWORK:-mainnet}/genesis:/genesis
      # - node-db:/data
      # - node-ipc:/ipc
      - /home/ubuntu/adadata:/mount
    restart: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "400k"
        max-file: "20"
    ports:
      - "12798:12798"
# # Don't need 3001:3001 b/c p2p. Can have Scott close it.

# Not sure if this will work, socket is correct volumed in w/ run commands.
  ogmios:
    image: cardanosolutions/ogmios:latest-${NETWORK:-mainnet}
    # build:
      # context: ./ogmios  # Changed, will this work?
      # target: ogmios
      # cache_from: [cardanosolutions/ogmios:latest]
    restart: on-failure
    command: [
      "--host", "0.0.0.0",
      "--node-socket", "/ipc/node.socket",
      "--node-config", "/config/cardano-node/config.json"
    ]
    volumes:
      - ./ogmios/server/config/network/${NETWORK:-mainnet}:/config
      # - node-ipc:/ipc
      - /home/ubuntu/adadata/ipc:/ipc
    ports:
      - ${OGMIOS_PORT:-1337}:1337

# This should be all set. Changed the volume locations to my local ones. And the default version of db-sync to 12.0.2
  cardano-db-sync-extended:
    image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.0.0}
    command: [
      "--config", "/config/cardano-db-sync/config.json",
      "--socket-path", "/node-ipc/node.socket"
    ]
    environment:
      - EXTENDED=true
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
      - RESTORE_RECREATE_DB=N
    depends_on:
      # - cardano-node-ogmios
      - cardano-node
      - ogmios
      - postgres
    secrets:
      - postgres_password
      - postgres_user
      - postgres_db
    volumes:
      - ./config/network/${NETWORK:-mainnet}:/config
      # - db-sync-data:/var/lib/cdbsync
      # Changed this line to 'cexplorer' b/c the GitHub repo has it as the file name.
      - /home/ubuntu/adadata/dbsync:/var/lib/cexplorer
      # - node-ipc:/node-ipc
      - /home/ubuntu/adadata/ipc:/node-ipc
    restart: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

# Not sure what this is, but I'll leave it for now
  hasura:
#     build:
#       context: ./packages/api-cardano-db-hasura/hasura
    image: inputoutput/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-6.2.0}
    ports:
      - ${HASURA_PORT:-8090}:8080
    depends_on:
      - "postgres"
    restart: on-failure
    environment:
      - HASURA_GRAPHQL_ENABLE_CONSOLE=true
      - HASURA_GRAPHQL_CORS_DOMAIN=http://localhost:9695
    secrets:
      - postgres_db
      - postgres_password
      - postgres_user
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

# This should be fine. Might need to adjust config stuff if it doesn't work.
  cardano-graphql:
#     build:
#       args:
#         - NETWORK=${NETWORK:-mainnet}
#         - METADATA_SERVER_URI=${METADATA_SERVER_URI:-https://tokens.cardano.org}
#       cache_from: [ inputoutput/cardano-graphql:latest ]
#       context: .
#       target: server
    image: inputoutput/cardano-graphql:${CARDANO_GRAPHQL_VERSION:-latest}-${NETWORK:-mainnet}
    environment:
      - ALLOW_INTROSPECTION=true
      - CACHE_ENABLED=true
      - LOGGER_MIN_SEVERITY=${LOGGER_MIN_SEVERITY:-info}
    expose:
      - ${API_PORT:-3100}
    ports:
      - ${API_PORT:-3100}:3100
    restart: on-failure
    secrets:
      - postgres_db
      - postgres_password
      - postgres_user
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

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

Once DB-Sync has finished/caught up:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' \
  http://localhost:3100/graphql

Actual Result

curl: (56) Recv failure: Connection reset by peer

Expected Result

{ cardanoDbMeta { initialized syncPercentage }}

https://github.com/input-output-hk/cardano-graphql#check-cardano-db-sync-progress

Environment

                     | |
  ____   ____   ____ | |
 / ___) / _  | / _  || |
( (___ ( ( | || | | || |
 \____) \_|| | \_|| ||_|
       (_____|    |_|
{ os:
   { arch: 'x64',
     cpus:
      { count: 8,
        model: 'Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz' },
     release: '5.15.0-1015-aws',
     totalMem: 66599522304,
     type: 'Linux' },
  version: '6.2.0' }

Platform

Platform version

No response

Runtime

Runtime version

Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1

jcfd3 commented 2 years ago

I've followed the advice of #642 and did

docker-compose down
docker-compose up -d

to remove the restore flags, but I'm still not able to connect.

jcfd3 commented 2 years ago

My Postgres service is showing this error log: log.txt

2022-07-26 14:59:18.733 UTC [121] ERROR:  column epoch_param.coins_per_utxo_word does not exist at character 2981
2022-07-26 14:59:18.733 UTC [121] STATEMENT:
        CREATE VIEW "AdaPots" AS
          SELECT
            epoch_no AS "epochNo",
            deposits,
            fees,
            reserves,
            rewards,
            slot_no AS "slotNo",
            treasury,
            utxo
        FROM ada_pots;

        CREATE TABLE IF NOT EXISTS "Asset" (
            "assetId" BYTEA PRIMARY KEY,
            "assetName" BYTEA,
            "decimals" INT,
            "description" VARCHAR(500),
            "fingerprint" CHAR(44),
            "firstAppearedInSlot" INT,
            "logo" VARCHAR(65536),
            "metadataHash" CHAR(40),
            "name" VARCHAR(50),
            "policyId" BYTEA,
            "ticker" VARCHAR(9),
            "url" VARCHAR(250)
        );

        CREATE VIEW "Block" AS
         SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum
                   FROM tx
                  WHERE (tx.block_id = block.id)), (0)::NUMERIC))::bigint AS fees,
            block.hash,
            block.block_no AS "number",
            block.op_cert AS "opCert",
...
...
jcfd3 commented 2 years ago

Also getting this in the GraphQL Logs:

{"name":"cardano-graphql","hostname":"4cdee4fd5884","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-26T15:25:17.257Z","v":0}
{"name":"cardano-graphql","hostname":"4cdee4fd5884","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-26T15:25:17.479Z","v":0}
{"name":"cardano-graphql","hostname":"4cdee4fd5884","pid":1,"level":50,"msg":"Command failed: /usr/local/bin/hasura --skip-update-check --project /app/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all\ntime=\"2022-07-26T15:28:45Z\" level=fatal msg=\"apply failed: [postgres-error] query execution failed ($.args[0].args)\\r\\nFile: '1589369664961_init/up.sql'\\r\\n{\\n    \\\"check_metadata_consistency\\\": false,\\n    \\\"sql\\\": \\\"\\\\nCREATE VIEW \\\\\\\"AdaPots\\\\\\\" AS\\\\n  SELECT\\\\n    epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    deposits,\\\\n    fees,\\\\n    reserves,\\\\n    rewards,\\\\n    slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    treasury,\\\\n    utxo\\\\nFROM ada_pots;\\\\n\\\\nCREATE TABLE IF NOT EXISTS \\\\\\\"Asset\\\\\\\" (\\\\n    \\\\\\\"assetId\\\\\\\" BYTEA PRIMARY KEY,\\\\n    \\\\\\\"assetName\\\\\\\" BYTEA,\\\\n    \\\\\\\"decimals\\\\\\\" INT,\\\\n    \\\\\\\"description\\\\\\\" VARCHAR(500),\\\\n    \\\\\\\"fingerprint\\\\\\\" CHAR(44),\\\\n    \\\\\\\"firstAppearedInSlot\\\\\\\" INT,\\\\n    \\\\\\\"logo\\\\\\\" VARCHAR(65536),\\\\n    \\\\\\\"metadataHash\\\\\\\" CHAR(40),\\\\n    \\\\\\\"name\\\\\\\" VARCHAR(50),\\\\n    \\\\\\\"policyId\\\\\\\" BYTEA,\\\\n    \\\\\\\"ticker\\\\\\\" VARCHAR(9),\\\\n    \\\\\\\"url\\\\\\\" VARCHAR(250)\\\\n);\\\\n\\\\nCREATE VIEW \\\\\\\"Block\\\\\\\" AS\\\\n SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum\\\\n           FROM tx\\\\n          WHERE (tx.block_id = block.id)), (0)::NUMERIC))::bigint AS fees,\\\\n    block.hash,\\\\n    block.block_no AS \\\\\\\"number\\\\\\\",\\\\n    block.op_cert AS \\\\\\\"opCert\\\\\\\",\\\\n    previous_block.hash AS \\\\\\\"previousBlockHash\\\\\\\",\\\\n    next_block.hash AS \\\\\\\"nextBlockHash\\\\\\\",\\\\n    jsonb_build_object('major', block.proto_major, 'minor', block.proto_minor) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n    block.size,\\\\n    block.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    block.\\\\\\\"time\\\\\\\" AS \\\\\\\"forgedAt\\\\\\\",\\\\n    block.epoch_slot_no AS \\\\\\\"slotInEpoch\\\\\\\",\\\\n    block.slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    slot_leader.id AS \\\\\\\"slot_leader_id\\\\\\\",\\\\n    slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\",\\\\n    block.vrf_key As \\\\\\\"vrfKey\\\\\\\"\\\\n   FROM (((block\\\\n     LEFT JOIN block previous_block ON ((block.previous_id = previous_block.id)))\\\\n     LEFT JOIN block next_block ON ((next_block.previous_id = block.id)))\\\\n     LEFT JOIN slot_leader ON ((block.slot_leader_id = slot_leader.id)));\\\\n\\\\nCREATE OR REPLACE VIEW \\\\\\\"Cardano\\\\\\\" AS\\\\n SELECT block.block_no AS \\\\\\\"tipBlockNo\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"currentEpochNo\\\\\\\"\\\\n   FROM block\\\\n  WHERE (block.block_no IS NOT NULL)\\\\n  ORDER BY block.block_no DESC\\\\n LIMIT 1;\\\\n \\\\nCREATE VIEW \\\\\\\"Collateral\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  collateral_tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN collateral_tx_in\\\\n  ON collateral_tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON collateral_tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND collateral_tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Delegation\\\\\\\" AS\\\\nSELECT\\\\n  delegation.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  delegation.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  delegation.tx_id AS \\\\\\\"tx_id\\\\\\\",\\\\n  pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM delegation\\\\nJOIN stake_address on delegation.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Epoch\\\\\\\" AS\\\\nSELECT\\\\n  epoch.fees AS \\\\\\\"fees\\\\\\\",\\\\n  epoch.out_sum AS \\\\\\\"output\\\\\\\",\\\\n  epoch.no AS \\\\\\\"number\\\\\\\",\\\\n  epoch_param.nonce AS \\\\\\\"nonce\\\\\\\",\\\\n  epoch.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n  epoch.start_time AS \\\\\\\"startedAt\\\\\\\",\\\\n  epoch.end_time AS \\\\\\\"lastBlockTime\\\\\\\",\\\\n  epoch.blk_count AS \\\\\\\"blocksCount\\\\\\\"\\\\nFROM epoch\\\\n  LEFT JOIN epoch_param on epoch.no = epoch_param.epoch_no;\\\\n\\\\nCREATE VIEW \\\\\\\"ShelleyEpochProtocolParams\\\\\\\" AS\\\\nSELECT\\\\n  epoch_param.influence AS \\\\\\\"a0\\\\\\\",\\\\n  epoch_param.coins_per_utxo_word AS \\\\\\\"coinsPerUtxoWord\\\\\\\",\\\\n  epoch_param.collateral_percent AS \\\\\\\"collateralPercent\\\\\\\",\\\\n  cost_model.costs AS \\\\\\\"costModels\\\\\\\",\\\\n  epoch_param.decentralisation AS \\\\\\\"decentralisationParam\\\\\\\",\\\\n  epoch_param.max_collateral_inputs AS \\\\\\\"maxCollateralInputs\\\\\\\",\\\\n  epoch_param.max_epoch AS \\\\\\\"eMax\\\\\\\",\\\\n  epoch_param.epoch_no AS \\\\\\\"epoch_no\\\\\\\",\\\\n  epoch_param.entropy AS \\\\\\\"extraEntropy\\\\\\\",\\\\n  epoch_param.key_deposit AS \\\\\\\"keyDeposit\\\\\\\",\\\\n  epoch_param.max_block_size AS \\\\\\\"maxBlockBodySize\\\\\\\",\\\\n  epoch_param.max_block_ex_mem AS \\\\\\\"maxBlockExMem\\\\\\\",\\\\n  epoch_param.max_block_ex_steps AS \\\\\\\"maxBlockExSteps\\\\\\\",\\\\n  epoch_param.max_bh_size AS \\\\\\\"maxBlockHeaderSize\\\\\\\",\\\\n  epoch_param.max_tx_ex_mem AS \\\\\\\"maxTxExMem\\\\\\\",\\\\n  epoch_param.max_tx_ex_steps AS \\\\\\\"maxTxExSteps\\\\\\\",\\\\n  epoch_param.max_tx_size AS \\\\\\\"maxTxSize\\\\\\\",\\\\n  epoch_param.max_val_size AS \\\\\\\"maxValSize\\\\\\\",\\\\n  epoch_param.min_fee_a AS \\\\\\\"minFeeA\\\\\\\",\\\\n  epoch_param.min_fee_b AS \\\\\\\"minFeeB\\\\\\\",\\\\n  epoch_param.min_pool_cost AS \\\\\\\"minPoolCost\\\\\\\",\\\\n  epoch_param.min_utxo_value AS \\\\\\\"minUTxOValue\\\\\\\",\\\\n  epoch_param.optimal_pool_count AS \\\\\\\"nOpt\\\\\\\",\\\\n  epoch_param.pool_deposit AS \\\\\\\"poolDeposit\\\\\\\",\\\\n  epoch_param.price_mem AS \\\\\\\"priceMem\\\\\\\",\\\\n  epoch_param.price_step AS \\\\\\\"priceStep\\\\\\\",\\\\n  jsonb_build_object('major', epoch_param.protocol_major, 'minor', epoch_param.protocol_major) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n  epoch_param.monetary_expand_rate AS \\\\\\\"rho\\\\\\\",\\\\n  epoch_param.treasury_growth_rate AS \\\\\\\"tau\\\\\\\"\\\\nFROM epoch_param\\\\nJOIN cost_model\\\\n  ON epoch_param.cost_model_id = cost_model.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Redeemer\\\\\\\" AS\\\\nSELECT\\\\n  redeemer.fee AS \\\\\\\"fee\\\\\\\",\\\\n  redeemer.id AS \\\\\\\"id\\\\\\\",\\\\n  redeemer.index AS \\\\\\\"index\\\\\\\",\\\\n  redeemer.purpose AS \\\\\\\"purpose\\\\\\\",\\\\n  redeemer.script_hash AS \\\\\\\"scriptHash\\\\\\\",\\\\n  redeemer.tx_id AS \\\\\\\"txId\\\\\\\",\\\\n  redeemer.unit_mem AS \\\\\\\"unitMem\\\\\\\",\\\\n  redeemer.unit_steps AS \\\\\\\"unitSteps\\\\\\\"\\\\nFROM redeemer;\\\\n\\\\nCREATE VIEW \\\\\\\"Reward\\\\\\\" AS\\\\nSELECT\\\\n  reward.amount,\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  reward.earned_epoch AS \\\\\\\"earnedInEpochNo\\\\\\\",\\\\n  reward.pool_id AS pool_hash_id,\\\\n  reward.spendable_epoch AS \\\\\\\"receivedInEpochNo\\\\\\\",\\\\n  reward.type AS \\\\\\\"type\\\\\\\"\\\\nFROM reward\\\\nJOIN stake_address on reward.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Script\\\\\\\" AS\\\\nSELECT\\\\n  script.hash AS \\\\\\\"hash\\\\\\\",\\\\n  script.serialised_size AS \\\\\\\"serialisedSize\\\\\\\",\\\\n  script.type AS \\\\\\\"type\\\\\\\",\\\\n  script.tx_id AS \\\\\\\"txId\\\\\\\"\\\\nFROM script;\\\\n\\\\nCREATE VIEW \\\\\\\"SlotLeader\\\\\\\" AS\\\\nSELECT\\\\n  slot_leader.hash AS \\\\\\\"hash\\\\\\\",\\\\n  slot_leader.id AS \\\\\\\"id\\\\\\\",\\\\n  slot_leader.description AS \\\\\\\"description\\\\\\\",\\\\n  slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM slot_leader;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeDeregistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_deregistration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_deregistration.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  stake_deregistration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_deregistration\\\\nJOIN stake_address on stake_deregistration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePool\\\\\\\" AS\\\\nWITH\\\\n  latest_block_times AS (\\\\n    SELECT pool.hash_id, max(block.time) AS blockTime\\\\n    FROM pool_update AS pool\\\\n    JOIN tx ON pool.registered_tx_id = tx.id\\\\n    JOIN block ON tx.block_id = block.id\\\\n    group by pool.hash_id\\\\n)\\\\nSELECT\\\\n  pool.fixed_cost AS \\\\\\\"fixedCost\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"hash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"id\\\\\\\",\\\\n  pool.hash_id AS \\\\\\\"hash_id\\\\\\\",\\\\n  pool.id AS \\\\\\\"update_id\\\\\\\",\\\\n  pool.margin AS \\\\\\\"margin\\\\\\\",\\\\n  pool_metadata_ref.hash AS \\\\\\\"metadataHash\\\\\\\",\\\\n  block.block_no AS \\\\\\\"blockNo\\\\\\\",\\\\n  pool.registered_tx_id AS \\\\\\\"updated_in_tx_id\\\\\\\",\\\\n  pool.pledge AS \\\\\\\"pledge\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"rewardAddress\\\\\\\",\\\\n  pool_metadata_ref.url AS \\\\\\\"url\\\\\\\"\\\\nFROM pool_update AS pool\\\\n  LEFT JOIN pool_metadata_ref ON pool.meta_id = pool_metadata_ref.id\\\\n  INNER JOIN tx ON pool.registered_tx_id = tx.id\\\\n  INNER JOIN latest_block_times ON latest_block_times.hash_id = pool.hash_id\\\\n  INNER JOIN block ON tx.block_id = block.id AND latest_block_times.blockTime = block.time\\\\n  JOIN stake_address on pool.reward_addr = stake_address.hash_raw\\\\n  JOIN pool_hash on pool_hash.id = pool.hash_id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolOwner\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.hash_raw as \\\\\\\"hash\\\\\\\",\\\\n  pool_owner.pool_hash_id as \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_owner\\\\n  LEFT JOIN stake_address ON pool_owner.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolRetirement\\\\\\\" AS\\\\nSELECT\\\\n  retiring_epoch as \\\\\\\"inEffectFrom\\\\\\\",\\\\n  announced_tx_id as \\\\\\\"tx_id\\\\\\\",\\\\n  hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_retire;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeRegistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_registration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_registration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_registration\\\\nJOIN stake_address on stake_registration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"ActiveStake\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  amount AS \\\\\\\"amount\\\\\\\",\\\\n  epoch_no as \\\\\\\"epochNo\\\\\\\",\\\\n  epoch_stake.id AS \\\\\\\"id\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"stakePoolHash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"stakePoolId\\\\\\\"\\\\nFROM epoch_stake\\\\nJOIN pool_hash\\\\n  ON pool_hash.id = epoch_stake.pool_id\\\\nJOIN stake_address on epoch_stake.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenMint\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(multi_asset.policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', multi_asset.name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  multi_asset.name AS \\\\\\\"assetName\\\\\\\",\\\\n  multi_asset.policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_id\\\\nFROM ma_tx_mint\\\\nJOIN multi_asset\\\\n  ON ma_tx_mint.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenInOutput\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  name as \\\\\\\"assetName\\\\\\\",\\\\n  policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_out_id\\\\nFROM ma_tx_out\\\\nJOIN multi_asset\\\\n  ON ma_tx_out.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Transaction\\\\\\\" AS\\\\nSELECT\\\\n  block.hash AS \\\\\\\"blockHash\\\\\\\",\\\\n  tx.block_index AS \\\\\\\"blockIndex\\\\\\\",\\\\n  tx.deposit AS \\\\\\\"deposit\\\\\\\",\\\\n  COALESCE(tx.fee, 0) AS fee,\\\\n  tx.hash,\\\\n  tx.id,\\\\n  block.time AS \\\\\\\"includedAt\\\\\\\",\\\\n  tx.invalid_before AS \\\\\\\"invalidBefore\\\\\\\",\\\\n  tx.invalid_hereafter AS \\\\\\\"invalidHereafter\\\\\\\",\\\\n  tx.script_size AS \\\\\\\"scriptSize\\\\\\\",\\\\n  tx.size,\\\\n  CAST(COALESCE((SELECT SUM(\\\\\\\"value\\\\\\\") FROM tx_out WHERE tx_id = tx.id), 0) AS bigint) AS \\\\\\\"totalOutput\\\\\\\",\\\\n  tx.valid_contract AS \\\\\\\"validContract\\\\\\\"\\\\nFROM\\\\n  tx\\\\nINNER JOIN block\\\\n  ON block.id = tx.block_id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionInput\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  tx_in.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN tx_in\\\\n  ON tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionOutput\\\\\\\" AS\\\\nSELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id;\\\\n\\\\nCREATE VIEW \\\\\\\"Utxo\\\\\\\" AS SELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id\\\\nLEFT OUTER JOIN tx_in\\\\n  ON tx_out.tx_id = tx_in.tx_out_id\\\\n  AND tx_out.index = tx_in.tx_out_index\\\\nWHERE tx_in.tx_in_id IS NULL;\\\\n\\\\nCREATE VIEW \\\\\\\"Withdrawal\\\\\\\" AS\\\\nSELECT\\\\n  withdrawal.amount AS \\\\\\\"amount\\\\\\\",\\\\n  withdrawal.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view \\\\\\\"address\\\\\\\",\\\\n  withdrawal.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  withdrawal.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM withdrawal\\\\nJOIN stake_address on withdrawal.addr_id = stake_address.id;\\\\n\\\\nCREATE INDEX idx_block_hash\\\\n    ON block(hash);\\\\n\\\\nCREATE INDEX idx_multi_asset_name\\\\n    ON multi_asset(name);\\\\n\\\\nCREATE INDEX idx_multi_asset_policy\\\\n    ON multi_asset(policy);\\\\n\\\\nCREATE INDEX idx_reward_type\\\\n    ON reward(type);\\\\n\\\\nCREATE INDEX idx_tx_hash\\\\n    ON tx(hash);\\\\n\\\\nCREATE INDEX idx_tx_in_consuming_tx\\\\n   ON tx_in(tx_out_id);\\\\n\\\\nCREATE INDEX idx_tx_out_tx\\\\n    ON tx_out(tx_id);\\\\n\\\\nCREATE function utxo_set_at_block(\\\\\\\"hash\\\\\\\" hash32type)\\\\nRETURNS SETOF \\\\\\\"TransactionOutput\\\\\\\" AS $$\\\\n  SELECT\\\\n    \\\\\\\"TransactionOutput\\\\\\\".address,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"addressHasScript\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".value,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"id\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".index\\\\n  FROM tx\\\\n  JOIN tx_out\\\\n    ON tx.id = tx_out.tx_id\\\\n  JOIN \\\\\\\"TransactionOutput\\\\\\\"\\\\n    ON tx.hash = \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\"\\\\n  LEFT OUTER JOIN tx_in\\\\n    ON tx_out.tx_id = tx_in.tx_out_id\\\\n    AND tx_out.index = tx_in.tx_out_index\\\\n  WHERE tx_in.tx_in_id IS NULL\\\\n  AND tx.block_id \\\\u003c= (SELECT id FROM block WHERE hash = \\\\\\\"hash\\\\\\\")\\\\n$$ LANGUAGE SQL stable;\\\\n\\\\n\\\"\\n}\\r\\n[42703] FatalError: column epoch_param.coins_per_utxo_word does not exist\"\n","time":"2022-07-26T15:28:45.071Z","v":0}
apufvqsp commented 2 years ago

My cardano-graphql node also has the exact same error log,print the above error log over and over again

How to solve this problem?

@joshcaskiefoundry My node can be accessed normally, using cardano-graphql master branch, db-sync-snapshot-schema-13 and the following docker image, it can be synchronized normally, and port 3100 can be accessed normally

REPOSITORY TAG IMAGE ID CREATED SIZE inputoutput/cardano-graphql master-mainnet d29ea8305983 6 days ago 326MB inputoutput/cardano-db-sync 13.0.1 b664f73a6dcd 2 weeks ago 938MB cardanosolutions/cardano-node-ogmios v5.5.1-mainnet 84eef320e382 3 weeks ago 816MB inputoutput/cardano-graphql-hasura 6.2.0 baf65475fa61 5 months ago 87.9MB postgres 11.5-alpine da01ecfbabe1 2 years ago 71.8MB

jcfd3 commented 2 years ago

port 3100 can be accessed normally

@apufvqsp So you aren't getting this curl error? curl localhost:3100/graphql -> curl: (56) Recv failure: Connection reset by peer

I'm running a semi-custom version of the graphql setup, only that I separated the ogmios and cardano-node combined image into their two separate parts. However, I did just get working a version of the current graphql docker-compose.yml, but I'd rather avoid syncing it again which took a long time.

Do you happen to remember when port 3100 was accessible? I've seen things that mention it can only be checked once DB-sync is finished or at other times after a restart, but none of the recommendations have worked for me.

apufvqsp commented 2 years ago

@joshcaskiefoundry Before I changed the docker image version of inputoutput/cardano-graphql from v6.2.0 to master-mainnet, the error log of my node was exactly the same as yours

After I changed the docker image version to master-mainnet, and executed the docker-compose down, docker-compose down up commands, I got this output in the log mainnet-cardano-graphql-1 | {"name":"cardano-graphql","hostname":"6bdcc8dfb606","pid":1,"level":30,"module":"Server","msg":"GraphQL HTTP server at http://0.0.0.0:3100/ started","time":"2022-07-27T07:22:57.113Z","v":0}

Then execute the following curl to access port 3100

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":false,"syncPercentage":82.59}}}

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"data":{"cardano":{"tip":{"number":6994529,"slotNo":55672326,"epoch":{"number":326}}}}}
Red3nzo commented 2 years ago

@apufvqsp I've been having the same issues I'm going to try your solution to get rid of the Hasura error

rhyslbw commented 2 years ago

This will likely be fixed in master after https://github.com/input-output-hk/cardano-graphql/pull/745 is merged.

jcfd3 commented 2 years ago

I switched the version to master-mainnet but I'm still not getting any logs saying the GraphQL server has started:

{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-28T19:54:46.358Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-28T19:54:46.624Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initializing. This can take a few minutes...","time":"2022-07-28T19:54:46.880Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"HasuraClient","msg":"Initialized","time":"2022-07-28T20:22:28.311Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initializing","time":"2022-07-28T20:22:28.315Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initialized","time":"2022-07-28T20:22:28.733Z","v":0}
{"name":"cardano-graphql","hostname":"27d139b6ffc8","pid":1,"level":30,"module":"ChainFollower","msg":"Initializing","time":"2022-07-28T20:22:28.733Z","v":0}

Could I potentially see an entire log file up to the point where the GraphQL client initializes to diagnose the error? I'll try recombining the cardano-node and ogmios server again next.

jcfd3 commented 2 years ago

This is my most recent error log with cardano-node-ogmios operational and the data is fully synced:

{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-29T14:10:44.365Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-29T14:10:44.595Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initializing. This can take a few minutes...","time":"2022-07-29T14:10:44.710Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initialized","time":"2022-07-29T14:13:19.556Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initializing","time":"2022-07-29T14:13:19.556Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initialized","time":"2022-07-29T14:13:19.896Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"ChainFollower","msg":"Initializing","time":"2022-07-29T14:13:19.896Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"ChainFollower","msg":"Initialized","time":"2022-07-29T14:13:19.900Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":50,"msg":"Command failed: /usr/local/bin/hasura --skip-update-check --project /app/packages/api-cardano-db-hasura/hasura/project --endpoint http://hasura:8080 migrate apply --up all\ntime=\"2022-07-29T14:14:12Z\" level=fatal msg=\"apply failed: [postgres-error] query execution failed ($.args[0].args)\\r\\nFile: '1589369664961_init/up.sql'\\r\\n{\\n    \\\"check_metadata_consistency\\\": false,\\n    \\\"sql\\\": \\\"\\\\nCREATE VIEW \\\\\\\"AdaPots\\\\\\\" AS\\\\n  SELECT\\\\n    epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    deposits,\\\\n    fees,\\\\n    reserves,\\\\n    rewards,\\\\n    slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    treasury,\\\\n    utxo\\\\nFROM ada_pots;\\\\n\\\\nCREATE TABLE IF NOT EXISTS \\\\\\\"Asset\\\\\\\" (\\\\n    \\\\\\\"assetId\\\\\\\" BYTEA PRIMARY KEY,\\\\n    \\\\\\\"assetName\\\\\\\" BYTEA,\\\\n    \\\\\\\"decimals\\\\\\\" INT,\\\\n    \\\\\\\"description\\\\\\\" VARCHAR(500),\\\\n    \\\\\\\"fingerprint\\\\\\\" CHAR(44),\\\\n    \\\\\\\"firstAppearedInSlot\\\\\\\" INT,\\\\n    \\\\\\\"logo\\\\\\\" VARCHAR(65536),\\\\n    \\\\\\\"metadataHash\\\\\\\" CHAR(40),\\\\n    \\\\\\\"name\\\\\\\" VARCHAR(50),\\\\n    \\\\\\\"policyId\\\\\\\" BYTEA,\\\\n    \\\\\\\"ticker\\\\\\\" VARCHAR(9),\\\\n    \\\\\\\"url\\\\\\\" VARCHAR(250)\\\\n);\\\\n\\\\nCREATE VIEW \\\\\\\"Block\\\\\\\" AS\\\\n SELECT (COALESCE(( SELECT sum((tx.fee)::bigint) AS sum\\\\n           FROM tx\\\\n          WHERE (tx.block_id = block.id)), (0)::NUMERIC))::bigint AS fees,\\\\n    block.hash,\\\\n    block.block_no AS \\\\\\\"number\\\\\\\",\\\\n    block.op_cert AS \\\\\\\"opCert\\\\\\\",\\\\n    previous_block.hash AS \\\\\\\"previousBlockHash\\\\\\\",\\\\n    next_block.hash AS \\\\\\\"nextBlockHash\\\\\\\",\\\\n    jsonb_build_object('major', block.proto_major, 'minor', block.proto_minor) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n    block.size,\\\\n    block.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"epochNo\\\\\\\",\\\\n    block.\\\\\\\"time\\\\\\\" AS \\\\\\\"forgedAt\\\\\\\",\\\\n    block.epoch_slot_no AS \\\\\\\"slotInEpoch\\\\\\\",\\\\n    block.slot_no AS \\\\\\\"slotNo\\\\\\\",\\\\n    slot_leader.id AS \\\\\\\"slot_leader_id\\\\\\\",\\\\n    slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\",\\\\n    block.vrf_key As \\\\\\\"vrfKey\\\\\\\"\\\\n   FROM (((block\\\\n     LEFT JOIN block previous_block ON ((block.previous_id = previous_block.id)))\\\\n     LEFT JOIN block next_block ON ((next_block.previous_id = block.id)))\\\\n     LEFT JOIN slot_leader ON ((block.slot_leader_id = slot_leader.id)));\\\\n\\\\nCREATE OR REPLACE VIEW \\\\\\\"Cardano\\\\\\\" AS\\\\n SELECT block.block_no AS \\\\\\\"tipBlockNo\\\\\\\",\\\\n    block.epoch_no AS \\\\\\\"currentEpochNo\\\\\\\"\\\\n   FROM block\\\\n  WHERE (block.block_no IS NOT NULL)\\\\n  ORDER BY block.block_no DESC\\\\n LIMIT 1;\\\\n \\\\nCREATE VIEW \\\\\\\"Collateral\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  collateral_tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN collateral_tx_in\\\\n  ON collateral_tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON collateral_tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND collateral_tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Delegation\\\\\\\" AS\\\\nSELECT\\\\n  delegation.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  delegation.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  delegation.tx_id AS \\\\\\\"tx_id\\\\\\\",\\\\n  pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM delegation\\\\nJOIN stake_address on delegation.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Epoch\\\\\\\" AS\\\\nSELECT\\\\n  epoch.fees AS \\\\\\\"fees\\\\\\\",\\\\n  epoch.out_sum AS \\\\\\\"output\\\\\\\",\\\\n  epoch.no AS \\\\\\\"number\\\\\\\",\\\\n  epoch_param.nonce AS \\\\\\\"nonce\\\\\\\",\\\\n  epoch.tx_count AS \\\\\\\"transactionsCount\\\\\\\",\\\\n  epoch.start_time AS \\\\\\\"startedAt\\\\\\\",\\\\n  epoch.end_time AS \\\\\\\"lastBlockTime\\\\\\\",\\\\n  epoch.blk_count AS \\\\\\\"blocksCount\\\\\\\"\\\\nFROM epoch\\\\n  LEFT JOIN epoch_param on epoch.no = epoch_param.epoch_no;\\\\n\\\\nCREATE VIEW \\\\\\\"ShelleyEpochProtocolParams\\\\\\\" AS\\\\nSELECT\\\\n  epoch_param.influence AS \\\\\\\"a0\\\\\\\",\\\\n  epoch_param.coins_per_utxo_word AS \\\\\\\"coinsPerUtxoWord\\\\\\\",\\\\n  epoch_param.collateral_percent AS \\\\\\\"collateralPercent\\\\\\\",\\\\n  cost_model.costs AS \\\\\\\"costModels\\\\\\\",\\\\n  epoch_param.decentralisation AS \\\\\\\"decentralisationParam\\\\\\\",\\\\n  epoch_param.max_collateral_inputs AS \\\\\\\"maxCollateralInputs\\\\\\\",\\\\n  epoch_param.max_epoch AS \\\\\\\"eMax\\\\\\\",\\\\n  epoch_param.epoch_no AS \\\\\\\"epoch_no\\\\\\\",\\\\n  epoch_param.entropy AS \\\\\\\"extraEntropy\\\\\\\",\\\\n  epoch_param.key_deposit AS \\\\\\\"keyDeposit\\\\\\\",\\\\n  epoch_param.max_block_size AS \\\\\\\"maxBlockBodySize\\\\\\\",\\\\n  epoch_param.max_block_ex_mem AS \\\\\\\"maxBlockExMem\\\\\\\",\\\\n  epoch_param.max_block_ex_steps AS \\\\\\\"maxBlockExSteps\\\\\\\",\\\\n  epoch_param.max_bh_size AS \\\\\\\"maxBlockHeaderSize\\\\\\\",\\\\n  epoch_param.max_tx_ex_mem AS \\\\\\\"maxTxExMem\\\\\\\",\\\\n  epoch_param.max_tx_ex_steps AS \\\\\\\"maxTxExSteps\\\\\\\",\\\\n  epoch_param.max_tx_size AS \\\\\\\"maxTxSize\\\\\\\",\\\\n  epoch_param.max_val_size AS \\\\\\\"maxValSize\\\\\\\",\\\\n  epoch_param.min_fee_a AS \\\\\\\"minFeeA\\\\\\\",\\\\n  epoch_param.min_fee_b AS \\\\\\\"minFeeB\\\\\\\",\\\\n  epoch_param.min_pool_cost AS \\\\\\\"minPoolCost\\\\\\\",\\\\n  epoch_param.min_utxo_value AS \\\\\\\"minUTxOValue\\\\\\\",\\\\n  epoch_param.optimal_pool_count AS \\\\\\\"nOpt\\\\\\\",\\\\n  epoch_param.pool_deposit AS \\\\\\\"poolDeposit\\\\\\\",\\\\n  epoch_param.price_mem AS \\\\\\\"priceMem\\\\\\\",\\\\n  epoch_param.price_step AS \\\\\\\"priceStep\\\\\\\",\\\\n  jsonb_build_object('major', epoch_param.protocol_major, 'minor', epoch_param.protocol_major) AS \\\\\\\"protocolVersion\\\\\\\",\\\\n  epoch_param.monetary_expand_rate AS \\\\\\\"rho\\\\\\\",\\\\n  epoch_param.treasury_growth_rate AS \\\\\\\"tau\\\\\\\"\\\\nFROM epoch_param\\\\nJOIN cost_model\\\\n  ON epoch_param.cost_model_id = cost_model.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Redeemer\\\\\\\" AS\\\\nSELECT\\\\n  redeemer.fee AS \\\\\\\"fee\\\\\\\",\\\\n  redeemer.id AS \\\\\\\"id\\\\\\\",\\\\n  redeemer.index AS \\\\\\\"index\\\\\\\",\\\\n  redeemer.purpose AS \\\\\\\"purpose\\\\\\\",\\\\n  redeemer.script_hash AS \\\\\\\"scriptHash\\\\\\\",\\\\n  redeemer.tx_id AS \\\\\\\"txId\\\\\\\",\\\\n  redeemer.unit_mem AS \\\\\\\"unitMem\\\\\\\",\\\\n  redeemer.unit_steps AS \\\\\\\"unitSteps\\\\\\\"\\\\nFROM redeemer;\\\\n\\\\nCREATE VIEW \\\\\\\"Reward\\\\\\\" AS\\\\nSELECT\\\\n  reward.amount,\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  reward.earned_epoch AS \\\\\\\"earnedInEpochNo\\\\\\\",\\\\n  reward.pool_id AS pool_hash_id,\\\\n  reward.spendable_epoch AS \\\\\\\"receivedInEpochNo\\\\\\\",\\\\n  reward.type AS \\\\\\\"type\\\\\\\"\\\\nFROM reward\\\\nJOIN stake_address on reward.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Script\\\\\\\" AS\\\\nSELECT\\\\n  script.hash AS \\\\\\\"hash\\\\\\\",\\\\n  script.serialised_size AS \\\\\\\"serialisedSize\\\\\\\",\\\\n  script.type AS \\\\\\\"type\\\\\\\",\\\\n  script.tx_id AS \\\\\\\"txId\\\\\\\"\\\\nFROM script;\\\\n\\\\nCREATE VIEW \\\\\\\"SlotLeader\\\\\\\" AS\\\\nSELECT\\\\n  slot_leader.hash AS \\\\\\\"hash\\\\\\\",\\\\n  slot_leader.id AS \\\\\\\"id\\\\\\\",\\\\n  slot_leader.description AS \\\\\\\"description\\\\\\\",\\\\n  slot_leader.pool_hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM slot_leader;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeDeregistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_deregistration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_deregistration.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  stake_deregistration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_deregistration\\\\nJOIN stake_address on stake_deregistration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePool\\\\\\\" AS\\\\nWITH\\\\n  latest_block_times AS (\\\\n    SELECT pool.hash_id, max(block.time) AS blockTime\\\\n    FROM pool_update AS pool\\\\n    JOIN tx ON pool.registered_tx_id = tx.id\\\\n    JOIN block ON tx.block_id = block.id\\\\n    group by pool.hash_id\\\\n)\\\\nSELECT\\\\n  pool.fixed_cost AS \\\\\\\"fixedCost\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"hash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"id\\\\\\\",\\\\n  pool.hash_id AS \\\\\\\"hash_id\\\\\\\",\\\\n  pool.id AS \\\\\\\"update_id\\\\\\\",\\\\n  pool.margin AS \\\\\\\"margin\\\\\\\",\\\\n  pool_metadata_ref.hash AS \\\\\\\"metadataHash\\\\\\\",\\\\n  block.block_no AS \\\\\\\"blockNo\\\\\\\",\\\\n  pool.registered_tx_id AS \\\\\\\"updated_in_tx_id\\\\\\\",\\\\n  pool.pledge AS \\\\\\\"pledge\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"rewardAddress\\\\\\\",\\\\n  pool_metadata_ref.url AS \\\\\\\"url\\\\\\\"\\\\nFROM pool_update AS pool\\\\n  LEFT JOIN pool_metadata_ref ON pool.meta_id = pool_metadata_ref.id\\\\n  INNER JOIN tx ON pool.registered_tx_id = tx.id\\\\n  INNER JOIN latest_block_times ON latest_block_times.hash_id = pool.hash_id\\\\n  INNER JOIN block ON tx.block_id = block.id AND latest_block_times.blockTime = block.time\\\\n  JOIN stake_address on pool.reward_addr = stake_address.hash_raw\\\\n  JOIN pool_hash on pool_hash.id = pool.hash_id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolOwner\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.hash_raw as \\\\\\\"hash\\\\\\\",\\\\n  pool_owner.pool_hash_id as \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_owner\\\\n  LEFT JOIN stake_address ON pool_owner.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"StakePoolRetirement\\\\\\\" AS\\\\nSELECT\\\\n  retiring_epoch as \\\\\\\"inEffectFrom\\\\\\\",\\\\n  announced_tx_id as \\\\\\\"tx_id\\\\\\\",\\\\n  hash_id AS \\\\\\\"pool_hash_id\\\\\\\"\\\\nFROM pool_retire;\\\\n\\\\nCREATE VIEW \\\\\\\"StakeRegistration\\\\\\\" AS\\\\nSELECT\\\\n  stake_registration.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  stake_registration.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM stake_registration\\\\nJOIN stake_address on stake_registration.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"ActiveStake\\\\\\\" AS\\\\nSELECT\\\\n  stake_address.view AS \\\\\\\"address\\\\\\\",\\\\n  amount AS \\\\\\\"amount\\\\\\\",\\\\n  epoch_no as \\\\\\\"epochNo\\\\\\\",\\\\n  epoch_stake.id AS \\\\\\\"id\\\\\\\",\\\\n  pool_hash.hash_raw AS \\\\\\\"stakePoolHash\\\\\\\",\\\\n  pool_hash.view AS \\\\\\\"stakePoolId\\\\\\\"\\\\nFROM epoch_stake\\\\nJOIN pool_hash\\\\n  ON pool_hash.id = epoch_stake.pool_id\\\\nJOIN stake_address on epoch_stake.addr_id = stake_address.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenMint\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(multi_asset.policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', multi_asset.name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  multi_asset.name AS \\\\\\\"assetName\\\\\\\",\\\\n  multi_asset.policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_id\\\\nFROM ma_tx_mint\\\\nJOIN multi_asset\\\\n  ON ma_tx_mint.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TokenInOutput\\\\\\\" AS\\\\nSELECT\\\\n  CAST(CONCAT(policy, RIGHT(CONCAT(E'\\\\\\\\\\\\\\\\', name), -3)) as BYTEA) as \\\\\\\"assetId\\\\\\\",\\\\n  name as \\\\\\\"assetName\\\\\\\",\\\\n  policy AS \\\\\\\"policyId\\\\\\\",\\\\n  quantity,\\\\n  tx_out_id\\\\nFROM ma_tx_out\\\\nJOIN multi_asset\\\\n  ON ma_tx_out.ident = multi_asset.id;\\\\n\\\\nCREATE VIEW \\\\\\\"Transaction\\\\\\\" AS\\\\nSELECT\\\\n  block.hash AS \\\\\\\"blockHash\\\\\\\",\\\\n  tx.block_index AS \\\\\\\"blockIndex\\\\\\\",\\\\n  tx.deposit AS \\\\\\\"deposit\\\\\\\",\\\\n  COALESCE(tx.fee, 0) AS fee,\\\\n  tx.hash,\\\\n  tx.id,\\\\n  block.time AS \\\\\\\"includedAt\\\\\\\",\\\\n  tx.invalid_before AS \\\\\\\"invalidBefore\\\\\\\",\\\\n  tx.invalid_hereafter AS \\\\\\\"invalidHereafter\\\\\\\",\\\\n  tx.script_size AS \\\\\\\"scriptSize\\\\\\\",\\\\n  tx.size,\\\\n  CAST(COALESCE((SELECT SUM(\\\\\\\"value\\\\\\\") FROM tx_out WHERE tx_id = tx.id), 0) AS bigint) AS \\\\\\\"totalOutput\\\\\\\",\\\\n  tx.valid_contract AS \\\\\\\"validContract\\\\\\\"\\\\nFROM\\\\n  tx\\\\nINNER JOIN block\\\\n  ON block.id = tx.block_id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionInput\\\\\\\" AS\\\\nSELECT\\\\n  source_tx_out.address,\\\\n  tx_in.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  source_tx_out.value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  source_tx.hash AS \\\\\\\"sourceTxHash\\\\\\\",\\\\n  tx_in.tx_out_index AS \\\\\\\"sourceTxIndex\\\\\\\",\\\\n  source_tx_out.id AS source_tx_out_id\\\\nFROM\\\\n  tx\\\\nJOIN tx_in\\\\n  ON tx_in.tx_in_id = tx.id\\\\nJOIN tx_out AS source_tx_out\\\\n  ON tx_in.tx_out_id = source_tx_out.tx_id\\\\n  AND tx_in.tx_out_index = source_tx_out.index\\\\nJOIN tx AS source_tx\\\\n  ON source_tx_out.tx_id = source_tx.id;\\\\n\\\\nCREATE VIEW \\\\\\\"TransactionOutput\\\\\\\" AS\\\\nSELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id;\\\\n\\\\nCREATE VIEW \\\\\\\"Utxo\\\\\\\" AS SELECT\\\\n  address,\\\\n  tx_out.address_has_script AS \\\\\\\"addressHasScript\\\\\\\",\\\\n  value,\\\\n  tx.hash AS \\\\\\\"txHash\\\\\\\",\\\\n  tx_out.id,\\\\n  index\\\\nFROM tx\\\\nJOIN tx_out\\\\n  ON tx.id = tx_out.tx_id\\\\nLEFT OUTER JOIN tx_in\\\\n  ON tx_out.tx_id = tx_in.tx_out_id\\\\n  AND tx_out.index = tx_in.tx_out_index\\\\nWHERE tx_in.tx_in_id IS NULL;\\\\n\\\\nCREATE VIEW \\\\\\\"Withdrawal\\\\\\\" AS\\\\nSELECT\\\\n  withdrawal.amount AS \\\\\\\"amount\\\\\\\",\\\\n  withdrawal.id AS \\\\\\\"id\\\\\\\",\\\\n  stake_address.view \\\\\\\"address\\\\\\\",\\\\n  withdrawal.redeemer_id AS \\\\\\\"redeemerId\\\\\\\",\\\\n  withdrawal.tx_id AS \\\\\\\"tx_id\\\\\\\"\\\\nFROM withdrawal\\\\nJOIN stake_address on withdrawal.addr_id = stake_address.id;\\\\n\\\\nCREATE INDEX idx_block_hash\\\\n    ON block(hash);\\\\n\\\\nCREATE INDEX idx_multi_asset_name\\\\n    ON multi_asset(name);\\\\n\\\\nCREATE INDEX idx_multi_asset_policy\\\\n    ON multi_asset(policy);\\\\n\\\\nCREATE INDEX idx_reward_type\\\\n    ON reward(type);\\\\n\\\\nCREATE INDEX idx_tx_hash\\\\n    ON tx(hash);\\\\n\\\\nCREATE INDEX idx_tx_in_consuming_tx\\\\n   ON tx_in(tx_out_id);\\\\n\\\\nCREATE INDEX idx_tx_out_tx\\\\n    ON tx_out(tx_id);\\\\n\\\\nCREATE function utxo_set_at_block(\\\\\\\"hash\\\\\\\" hash32type)\\\\nRETURNS SETOF \\\\\\\"TransactionOutput\\\\\\\" AS $$\\\\n  SELECT\\\\n    \\\\\\\"TransactionOutput\\\\\\\".address,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"addressHasScript\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".value,\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"id\\\\\\\",\\\\n    \\\\\\\"TransactionOutput\\\\\\\".index\\\\n  FROM tx\\\\n  JOIN tx_out\\\\n    ON tx.id = tx_out.tx_id\\\\n  JOIN \\\\\\\"TransactionOutput\\\\\\\"\\\\n    ON tx.hash = \\\\\\\"TransactionOutput\\\\\\\".\\\\\\\"txHash\\\\\\\"\\\\n  LEFT OUTER JOIN tx_in\\\\n    ON tx_out.tx_id = tx_in.tx_out_id\\\\n    AND tx_out.index = tx_in.tx_out_index\\\\n  WHERE tx_in.tx_in_id IS NULL\\\\n  AND tx.block_id \\\\u003c= (SELECT id FROM block WHERE hash = \\\\\\\"hash\\\\\\\")\\\\n$$ LANGUAGE SQL stable;\\\\n\\\\n\\\"\\n}\\r\\n[42703] FatalError: column epoch_param.coins_per_utxo_word does not exist\"\n","time":"2022-07-29T14:14:12.652Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-29T14:14:14.016Z","v":0}
{"name":"cardano-graphql","hostname":"bc3fb4d309b1","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-29T14:14:14.256Z","v":0}

Looks like this is a FATAL error occurring: in the graphql container:

FatalError: column epoch_param.coins_per_utxo_word does not exist\"\n","time":"2022-07-29T14:14:12.652Z","v":0

This is also being received by the DB correctly, but an error is caused there:

2022-07-29 14:16:13.315 UTC [69] ERROR:  column epoch_param.coins_per_utxo_word does not exist at character 2981
2022-07-29 14:16:13.315 UTC [69] STATEMENT:
        CREATE VIEW "AdaPots" AS
          SELECT
            epoch_no AS "epochNo",
jcfd3 commented 2 years ago

I've gotten GraphQL working! After updating all of my container versions to recently pushed ones and confirming the config.toml I'm using through a volume mount, I left it running and the GraphQL server started nicely.

Here are my docker-compose.yml image versions:

    image: postgres:${POSTGRES_VERSION:-11.5-alpine}
    image: cardanosolutions/cardano-node-ogmios:${CARDANO_NODE_OGMIOS_VERSION:-v5.5.2}-${NETWORK:-mainnet}
    image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.0.2}
    image: inputoutput/cardano-graphql-hasura:${CARDANO_GRAPHQL_VERSION:-master}
    image: inputoutput/cardano-graphql:${CARDANO_GRAPHQL_VERSION:-master}-${NETWORK:-mainnet}

Logs from the graphql container:

{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-29T14:24:48.587Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-29T14:24:48.913Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"HasuraClient","msg":"Initialized","time":"2022-07-29T15:15:25.766Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initializing. This can take a few minutes...","time":"2022-07-29T15:15:25.767Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initialized","time":"2022-07-29T15:15:25.781Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initializing","time":"2022-07-29T15:15:25.781Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"MetadataFetchClient","msg":"Initialized","time":"2022-07-29T15:15:26.174Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Initializing","time":"2022-07-29T15:15:26.175Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Initialized","time":"2022-07-29T15:15:26.179Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Worker","msg":"Starting","time":"2022-07-29T15:15:26.218Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Worker","msg":"Started","time":"2022-07-29T15:15:26.362Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Starting","time":"2022-07-29T15:15:26.362Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Started","time":"2022-07-29T15:15:26.395Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Server","msg":"GraphQL HTTP server at http://0.0.0.0:3100/ started","time":"2022-07-29T15:15:26.396Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Rolling back to genesis","time":"2022-07-29T15:15:26.436Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"ChainFollower","msg":"Deleted 0 assets","time":"2022-07-29T15:15:26.441Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-07-29T15:16:04.250Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-07-29T15:16:38.150Z","v":0}
{"name":"cardano-graphql","hostname":"cb0fc400357e","pid":1,"level":30,"module":"Server","msg":"Sync Progress: cardano-db-sync: 100% | Asset: 0%","time":"2022-07-29T15:17:11.098Z","v":0}
KorayBarkin commented 2 years ago

@joshcaskiefoundry Before I changed the docker image version of inputoutput/cardano-graphql from v6.2.0 to master-mainnet, the error log of my node was exactly the same as yours

After I changed the docker image version to master-mainnet, and executed the docker-compose down, docker-compose down up commands, I got this output in the log mainnet-cardano-graphql-1 | {"name":"cardano-graphql","hostname":"6bdcc8dfb606","pid":1,"level":30,"module":"Server","msg":"GraphQL HTTP server at http://0.0.0.0:3100/ started","time":"2022-07-27T07:22:57.113Z","v":0}

Then execute the following curl to access port 3100

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":false,"syncPercentage":82.59}}}

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://localhost:3100/graphql
{"data":{"cardano":{"tip":{"number":6994529,"slotNo":55672326,"epoch":{"number":326}}}}}

How did you changed it bro? Did you do anything else other than changing docker-compose.yaml file?

jcfd3 commented 2 years ago

@KorayBarkin It looks like you got it working! If you are getting responses from the GraphQL server running on 3100 then your setup is functioning properly. And no I didn't change anything else. Updating the docker image version was all that needed to be done because the other one was 6 months out of date or something like that according to the Docker Hub. The master-mainnet image should handle the configuration and startup accordingly.