cardano-db-sync icon indicating copy to clipboard operation
cardano-db-sync copied to clipboard

cabal: The run command is for running a single executable at once.

Open PalluWeb opened this issue 1 year ago • 7 comments

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'.

PalluWeb avatar Aug 11 '23 05:08 PalluWeb

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

sgillespie avatar Aug 11 '23 13:08 sgillespie

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??

PalluWeb avatar Aug 16 '23 14:08 PalluWeb

How are you launching cardano-db-sync in this case? Are you using Nix or NixOS?

sgillespie avatar Aug 16 '23 15:08 sgillespie

i am using cabal

PalluWeb avatar Aug 17 '23 05:08 PalluWeb

i am using cabal

Still using the command in the original post?

sgillespie avatar Aug 17 '23 13:08 sgillespie

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/

PalluWeb avatar Aug 17 '23 14:08 PalluWeb

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/

sgillespie avatar Aug 17 '23 17:08 sgillespie