yeasy/docker-compose-files

<channel-ID.block> file disappears after restarting the network

Lumos-Nox opened this issue · 2 comments

What I did:

  • docker-compose -f docker-compose-cli.yaml up -d [bring the network up]
  • ...
  • peer channel create ... [<channel-ID.block> file was created]
  • peer channel join ... [peer0 in org1 joined the channel]
  • ...
  • docker-compose -f docker-compose-cli.yaml down [bring the network down]
  • docker-compose -f docker-compose-cli.yaml up -d [bring the network up again]

Phenomenon & what I want to do:

  • The original <channel-ID.block> file is gone
  • I want all the other peers to join the channel I've created above but I can't do it without the file

Problems

  • The channel cannot be removed
  • How to recreate the <channel-ID.block> file
  • Or how to join the channel

Any solutions are welcome. Thanks in advance.

yeasy commented

Are u meaning the hyperledger_fabric project?
Pls see the readme and use the make command instead of the direct usage of docker-compose.

Thank you @yeasy , I've already gotten this straightened out.

Solution is removing all volumes and cleaning up everything using the command 'docker-compose -f docker-compose-cli.yaml down -v' with the flag '-v'. And then start fresh.

I think it might be shutting down the containers that removes the <channel-ID.block> file. To prevent this circumstance, just back up the file or fetch block file from the channel.

That's it! Closing the issue...