Soundarya
Soundarya

Reputation: 143

Unable to restore the backup of fabric-samples test-network - Hyperledger fabric v2.2.0

I am trying to do backup and restore of a hyperledger fabric network v2.2.0. To test this, I used test-network of fabric release - https://github.com/hyperledger/fabric-samples/archive/refs/tags/v2.2.0.tar.gz. First I brought up the network, created the channel, deployed CC and performed invoke, query. Then I took backup by following the article - https://www.devprovider.com/how-to-take-backup-from-hyperledger-fabric. Once done with the backup, I have deleted the network. Then I tried to restore from the backup data (crypto-materials of orderer, peers, channel-artifacts, peer data and the orderer data). I confirmed that the restoration was successful by comparing the channel height from the network I have deleted and the restored network. It was 8 at the time when I took backup. So to check if everything is working from Chaincode perspective, I have tried query which resulted in error,

Error: endorsement failure during query. response: status:500 message:"error in simulation: failed to execute transaction 392e33eaadd537650590479036a1018946dcbbebaf3d55cbddb288e243485e80: could not launch chaincode basic_1.0:4ec191e793b27e953ff2ede5a8bcc63152cecb1e4c3f301a26e22692c61967ad: error starting container: error starting container: API error (404): network _test not found"

Same error for invoke. Can anyone please guide me on how to overcome the failure of CC invoke and query? Thanks in Advance!

Upvotes: 1

Views: 307

Answers (1)

Li Xian
Li Xian

Reputation: 411

you have not set the value of COMPOSE_PROJECT_NAME,set it arbitrary value before you start your fabric network

export COMPOSE_PROJECT_NAME=net

this variable setting starts chaincode containers on the same bridge network as the peers

Upvotes: 1

Related Questions