Hyperledger Composer v0.19 Error when starting the business network - hyperledger

I follow the step in download pre-requisite and then installing development environment. Now I stuck at developer tutorial :step 4 number 2 start the business network. I stuck at this error few days :(
THIS IS MY ERROR:
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin#hlfv1 --file networkadmin.card
Starting business network tutorial-network at version 0.0.1
Processing these Network Admins:
userName: admin
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: Unable to initalize channel. Attempted to contact 1 Peers. Last error was Error: Error: 2 UNKNOWN: access denied: channel [composerchannel] creator org [Org1MSP]
Command failed
I follow the hyperledger tutorial:
installing prerequisite - installing development environment - developer tutorial

Related

Hyperledger Fabric 2.3.3 install TypeScript chaincode issue can't invoke despite chaincode being installed?

Good day to you!
I'm doing some fairly advanced work with Hyperledger Fabric network setup, using Kubernetes and a bunch of custom shell scripts--each with commands inspired by fabric-samples--to run each phase of chaincode packaging and installation and I have debugged an issue I'm facing WRT switching an existing HLF project from Go chaincode to TS to the nth degree (have tried all sorts too) and I am baffled as to why it is not working...
I have plenty of context and output I can provide, however in a nutshell:
the chaincode packages, installs, approves & commits 100% successfully on all three of my peer organizations (org1, org2, org3)
all peer lifecycle chaincode <query> commands return successes (installed, approved, committed)
each command which can be passed the --init-required flag has it, and the invoke command uses flag --isInit
When trying to invoke however, it throws an error (redacted environment specific outputs):
make sure the chaincode <cc_name> has been successfully defined on channel <channel_id> and try again: chaincode definition for '<cc_name>' exists, but chaincode is not installed
Meanwhile, if I query the committed chaincode (works on all 3 orgs):
peer lifecycle chaincode querycommitted -C ${CHANNEL_ID} -n ${CC_NAME} >&log.txt
cat log.txt
Outputs:
Committed chaincode definition for chaincode '<cc_name>' on channel '<channel_id>'
Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true, Org3MSP: true]
Also, if I run peer lifecycle chaincode queryinstalled:
=========================
Querying installed chaincode inside Docker container [admin] for Organization org1...
Installed chaincodes on peer:
Package ID: <package_id>, Label: <label>
Query installed successful on peer0.org1 on channel allorgs [via admin].
=========================
Querying installed chaincode inside Docker container [admin] for Organization org2...
Installed chaincodes on peer:
Package ID: <package_id>, Label: <label>
Query installed successful on peer0.org2 on channel allorgs [via admin].
=========================
Querying installed chaincode inside Docker container [admin] for Organization org3...
Installed chaincodes on peer:
Package ID: <package_id>, Label: <label>
Query installed successful on peer0.org3 on channel allorgs [via admin].
=========================
To all intents and purposes, this is doing everything I have seen it do in the Go examples and should be considered installed, I'm not sure what else to try at this stage. I've had it configured where the package IDs generated on each org are different, but currently they all install the same packaged chaincode so all of those <package_id> entries match.
Finally, just to avoid wasting any time, this is the output for peer lifecycle chaincode queryapproved ...:
=========================
Querying approved chaincode inside Docker container [admin] for Organization org1...
Approved chaincode definition for chaincode '<cc_name>' on channel '<channel_id>':
sequence: 1, version: 1.0, init-required: true, package-id: <package_id>, endorsement plugin: escc, validation plugin: vscc
Query approved successful on peer0.org1 on channel <channel_id> [via admin].
=========================
Querying approved chaincode inside Docker container [admin] for Organization org2...
Approved chaincode definition for chaincode '<cc_name>' on channel '<channel_id>':
sequence: 1, version: 1.0, init-required: true, package-id: <package_id>, endorsement plugin: escc, validation plugin: vscc
Query approved successful on peer0.org2 on channel <channel_id> [via admin].
=========================
Querying approved chaincode inside Docker container [admin] for Organization org3...
Approved chaincode definition for chaincode '<cc_name>' on channel '<channel_id>':
sequence: 1, version: 1.0, init-required: true, package-id: <package_id>, endorsement plugin: escc, validation plugin: vscc
Query approved successful on peer0.org3 on channel <channel_id> [via admin].
=========================
Is it possible this error is happening for some other unclear reason such as the chaincode failing to execute... or? All suggestions welcome. I tried asking in the Hyperledger chat but no response from anyone there yet.
Thanks in advance,
Alex
I vaguely remember having a similar problem and you need to make sure package-ids and labels match up. Look on your peers where the chaincode package is installed. If you use the standard docker test images then you can exec into them and look in dir /var/hyperledger/production/lifecycle/chaincodes/
For example, my package-id is basic_1.0:db124ba32ae478421c66bb26fcd151326ae4ce5fa01e198a7ad9415ce31aa8c4 my chaincode name is basic and the version is 1.0 when creating the chaincode definition
my installed chaincode
/var/hyperledger/production/lifecycle/chaincodes # ls
basic_1.0.db124ba32ae478421c66bb26fcd151326ae4ce5fa01e198a7ad9415ce31aa8c4.tar.gz
my packaged chaincode metadata is
{"path":"../../chaincode/node","type":"node","label":"basic_1.0"}
Make sure everything matches correctly (the label is a concatenation of name and version)

How to fix HyperLedger Composer network start error that reports failure to start container?

I am having difficulty starting a new business network using HyperLedger Composer. I have been following this developer’s guide:
https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.
I have successfully completed all of the steps leading up to the composer network start command, including installing the network. When I run:
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin#hlfv1 --file networkadmin.card
I receive the following error:
“ ✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid
responses from any peers.
Response from attempted peer comms was an error: Error: failed to
execute transaction
eda196cff575945b24d2e123823f1b4ba3fefdf8c1525794f7869b47acad906e:
error starting container: error starting container: Failed to generate
platform-specific docker build: Error returned from build: 127
"/bin/sh: npm: not found
Command failed “
A few notes:
- I have used "composer archive list -a tutorial-network.bna” to confirm the version and network name
- I have checked that the network name is correct in the start command
- A few of the posts I have read and followed regarding this issue are listed below, and they have not solved the problem I am facing:
https://github.com/hyperledger/composer/issues/4043
https://github.com/hyperledger/composer/issues/3794
v0.19.2 hyperledger composer network start failed
One thing I have noticed is that the peer admin card is not associated with a business network, as determined by running:
composer network list --card PeerAdmin#hlfv1
I am not sure how to associate the card with a network, or if that is causing any issues.
Any suggestions regarding what may be causing this issue would be greatly appreciated, thank you.

Getting No valid responses from any peers. error when trying to "network start"

I am following the tutorial on: https://hyperledger.github.io/composer/v0.19/applications/web
To implement a frontend to my chain code. But when I try to put in the command:
composer network start --networkName perishable-network --networkVersion 0.2.7-deploy.0 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin#hlfv1
It gives me the error:
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: 2 UNKNOWN: chaincode error (status: 500, message: is
not a valid endorsement system chaincode) Command failed
When I did composer install on my bna however I got this information which I am using in the network start command.
✔ Installing business network. This may take a minute... Successfully
installed business network perishable-network, version 0.2.7-deploy.0
Command succeeded
How can I fix this error?
You are trying to use Composer 0.20 with Hyperledger Fabric 1.1. Unfortunately they are not compatible. You should either downgrade to Composer 0.19 or upgrade your fabric for 1.2

hyperledger composer network ping

composer network ping -c admin#tutorial-network
I got this error:
Error trying to ping. Unexpected end of JSON input.
Hyperledger: Error trying to ping. Unexpected end of JSON input
The reason for this error is that on the chaincode the identity admin is not activated/registered. There is an error in the output at
[composerchannel][d72614d6] failed to invoke chaincode name:"tutorial-network" , error: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier 'ce733115c6736cd28b4c499f52c28a2f7ed2b8f1a753615907afa1f4551738f0', has not been registered
What is the solution to this error?
I'm would guess you are trying to use Composer 0.19.x with a Fabric 1.2 network. Composer 0.19 doesn't support Fabric 1.2, you need to use a Fabric 1.1 network

HYPERLEDGER : Error While Starting Business Network

I am researching on Hyperledger. After going through the basic tutorials and documentation, I have started setting up a Blockchain Business Network With Hyperledger Fabric & Composer Running on Multiple Physical Machine as described on https://www.skcript.com/svr/setting-up-a-blockchain-business-network-with-hyperledger-fabric-and-composer-running-in-multiple-physical-machine/.
I am already done with setting up the Hyperledger environment. We are able to create business network archives (.bna) and business cards (.card) as well. But while I try to start the created business network (using composer network deploy and composer network start commands on Ubuntu CLI) the CLI responds with an error saying,
composer network start --networkAdmin admin --networkAdminEnrollSecret
adminpw --card admin#admin_conn --file admin.card -a
basic-sample-network.bna Starting business network from archive:
basic-sample-network.bna Business network definition:
Identifier: basic-sample-network#0.2.0-20180102082548
Description: The Hello World of Hyperledger Composer samples
Processing these Network Admins:
userName: admin
Starting business network definition. This may take a minute... Error:
Error trying to instantiate composer runtime. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: chaincode error (status: 500, message: cannot get
package for the chaincode to be instantiated
(basic-sample-network:0.16.6)-open
/var/hyperledger/production/chaincodes/basic-sample-network.0.16.6: no
such file or directory)
And on the playground UI,
It would be great if any of you could guide me to solve this problem.
Thanks in advance.
UPDATE :
Version of Composer : v0.19.0
Worked Out Link : https://hyperledger.github.io/composer/latest/business-network/bnd-deploy
This is where I got stucked now.
composer network install command worked fine. But network start command is not working fine.
user1#peer2:~/fabric-tools/rosternetwork$ composer network start --networkName rosternetwork --networkVersion 1.0.0 --card PeerAdmin#hlfv1 --networkAdmin admin -S adminpw
Response from attempted peer comms was an error: Error: 2 UNKNOWN: chain code error (status: 500, message: cannot get package for chaincode (rosternetwork:1.0.0))
Command failed
Starting business network rosternetwork at version 1.0.0
Processing these Network Admins:
userName: admin
Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: cannot get package for chaincode (rosternetwork:1.0.0))
Command failed
Searched with the error message, but didn't found any solution.

Resources