Reputation: 338
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
Upvotes: 0
Views: 1370
Reputation: 410
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 [email protected]
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkA.card
Upvotes: 1
Reputation: 338
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 [email protected] --file networkadmin.card
Upvotes: 0