Search code examples
postgresqlhyperledger-iroha

Hyperledger iroha - schema error while connecting to postgres database


I am trying to deploy Hyperledger Iroha on MacOS (BigSUr) locally, and while running the following command

./build/bin/irohad --config example/config.postgres.sample --genesis_block example/genesis.block --keypair_name example/node0

I get the error

Storage initialization failed: Cannot execute query. Fatal error. ERROR: relation "schema_version" does not exist LINE 1: ... test, iroha_major, iroha_minor, iroha_patch from schema_ver... ^ while executing "select 1 test, iroha_major, iroha_minor, iroha_patch from schema_version;".

I have installed Postgresql DB locally and created the iroha_data database. Is there a schema that i must load additionally or does it get auto created ?


Solution

  • I was able to overcome this issue by adding -drop_state while starting iroha daemon.