0

I would like to set up a Iroha Network consisting of 3 nodes on one host using docker containers. Therefore I have set up 3 postgres containers, 3 blockstores and one iroha-network.

Starting the different postgres containers works fine (mapped on the ports 5532, 5533, 5534). And the first iroha containers also seems to be working. But if I try to start the second container I get the following error:

docker run --name iroha1 -p 50052:50051 -v $(pwd)/node1:/opt/iroha_data -v blockstore1:/tmp/block_store --network=iroha-network -e KEY='node1' hyperledger/iroha:latest
key=node1
/opt/iroha_data
WARNING: IROHA_POSTGRES_HOST is not defined.
    Do not wait for Postgres to become ready. Iroha may fail to start up
[2019-05-24 09:42:39.416652545][I][Init]: Irohad version: 1.0.0
[2019-05-24 09:42:39.417173322][I][Init]: config initialized
[2019-05-24 09:42:39.419332310][I][Irohad]: created
[2019-05-24 09:42:39.419510386][I][Irohad/Storage]: Start storage creation
[2019-05-24 09:42:39.419664393][I][Irohad/Storage]: block store created
[2019-05-24 09:42:39.425382813][E][Init]: Failed to initialize storage

If I use the postgres container of the first node for the second node no error occurs i.e. the iroha container starts.

Any help or suggestion is greatly appreciated.

2 Answers2

0

The last line of the log that talks about storage failure to initialize is the cue.

To resolve this, make use of the second blockstore you created because the first blockstore blockstore1 is already in use. Make use of the second blockstore when starting the second iroha container e.g ... -v blockstore2:/tmp/block_store ...

Let me know if this is of help to you

Community
  • 1
  • 1
Ernest
  • 1,064
  • 11
  • 12
0

Check your config.docker file and make sure you have the network set to iroha-network and make sure you have the ports right.