0

I'm following this link: Hyperledger Composer Queries Tutorial to update an existing business network. Till step:3 everything working fine for me. But whenever I am executing step:4 (2) command I'm getting some error.

This is the error:

Error: Error trying to ping. Error: Error trying to query business network. Error: Connect Failed Command failed

Not sure why I'm getting the above error. It seems the business network is somehow not reachable.

Possibly I was getting the error as Fabric was not running in background. But after running the Fabric the error is slightly different. Here is the current error I am getting:

Error: Error trying to ping. Error: Error trying to query business network. Error: could not find chaincode with name 'tutorial-network' - make sure the chaincode tutorial-network has been successfully instantiated and try again Command failed

2 Answers2

1

I had the same problem when I restarted my system. I could not connect to the previous networks. I have the .bna file in the same folder and I ran these commands every time and it worked.

composer network install --card PeerAdmin@hlfv1 --archiveFile tutorial-network@0.0.1.bna

composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkA.card
Vineeth Sai
  • 3,389
  • 7
  • 23
  • 34
Dheeraj Kumar
  • 410
  • 6
  • 16
0

The network should be up and running then only you will be able to update it. Otherwise you will get some error and won't be able to update it.

So I ran the following command before updating it as mentioned in the question and it works well.

composer network start --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile tutorial-network@0.0.1.bna --file networkadmin.card