cardano-db-sync
cardano-db-sync copied to clipboard
cabal: The run command is for running a single executable at once.
Run method
PGPASSFILE=config/pgpass-mainnet cabal run cardano-db-sync --
--config config/mainnet-config.yaml
--socket-path ../cardano-node/state-node-mainnet/node.socket
--state-dir ledger-state/mainnet
--schema-dir schema/
Problem Report Warning: Requested index-state 2023-07-27T01:34:31Z is newer than 'hackage.haskell.org'! Falling back to older state (2023-07-26T23:47:54Z). Resolving dependencies...
cabal: The run command is for running a single executable at once. The target 'cardano-db-sync' refers to the package cardano-db-sync-13.1.1.2 which includes the executable 'test-http-get-json-metadata', the executable 'http-get-json-metadata' and the executable 'cardano-db-sync'.
Hi @PalluWeb, you should be able to change the cabal target cardano-db-sync
to cardano-db-sync:exe:cardano-db-sync
. As for the index state warning, running cabal update
should clear that
hey @sgillespie cardano-db-sync: FatalError {fatalErrorMessage = "Cannot find the node configuration file at : /nix/store/33r8vqnrlhbpk6vifd1hphphg8v6fc89-config-0-0.json"} how to resolve this??
How are you launching cardano-db-sync
in this case? Are you using Nix or NixOS?
i am using cabal
i am using cabal
Still using the command in the original post?
no
using like this
PGPASSFILE=config/pgpass-mainnet cabal run cardano-db-sync:exe:cardano-db-sync --
--config config/mainnet-config.yaml
--socket-path $HOME/cardano-src/cardano-node/state-node-mainnet/node.socket
--state-dir ledger-state/mainnet
--schema-dir schema/
It's caused by this line in the configuration: https://github.com/input-output-hk/cardano-db-sync/blob/master/config/mainnet-config.yaml#L15C1-L15C76, which is most likely wrong. This is a problem that needs to be fixed.
In the meantime, you can edit that file to point the the location of your cardano-node
configuration file. Alternatively, you can download all of these config files in the same directory, and they should all be correct: https://book.world.dev.cardano.org/environments/mainnet/