IBM / customer-loyalty-program

# WARNING: This repository is no longer maintained :warning: This pattern focuses on older technology (e.g. Hyperledger Fabric APIs prior to Fabric 1.4). Therefore, there is no support for this pattern and it will be archived on May 1, 2019. You are welcome to use up to that date, but we recommend that you begin working with the updated release found at https://developer.ibm.com/patterns/customer-loyalty-program-with-iks-saas-v2-fabric/.
https://developer.ibm.com/patterns/customer-loyalty-program-with-blockchain/
Apache License 2.0
64 stars 78 forks source link

Error when using command "composer network install ..." #10

Closed gnurtcouq closed 5 years ago

gnurtcouq commented 5 years ago

Hi all,

I followed the instruction to deploy network to Fabric locally as below:

1) Removing all running containers, and all previously created Hyperledger Fabric chaincode images: docker kill $(docker ps -q) docker rm $(docker ps -aq) docker rmi $(docker images dev-* -q)

2) Start fabric and create peer admin card: cd fabric-dev-servers/ ./downloadFabric.sh => OK ./startFabric.sh => )K ./createPeerAdminCard.sh Error: "v0.19.x is not supported for this level of fabric. Please use version 0.16"...

So I uninstall all v0.19.x and install v0.16.0 by commands:

npm uninstall composer-cli npm uninstall composer-rest-server npm uninstall -g generator-hyperledger-composer

Then install version 0.16:

npm install -g composer-cli@0.16.0 npm install -g composer-rest-server@0.16.0 npm install -g generator-hyperledger-composer@0.16.0

After that, I do step 2 above : Start fabric and create peer admin card:

cd fabric-dev-servers/ ./downloadFabric.sh => OK ./startFabric.sh => )K ./createPeerAdminCard.sh => OK

Then I do next step: 3) Install the business network:

cd ../ composer network install --card PeerAdmin@hlfv1 --archiveFile clp-network@0.0.1.bna Error: Incorrect command. Please see the list of commands above, or enter "composer network --help".

Found that my composer version is now v0.16.0, which is not support command "composer network install ...". Only composer version is now v0.19.x onward allows to use command "composer network install ...". Thus I stuck there because if use composer version v0.19.x, there is error in step 2) Start fabric and create peer admin card saying that "v0.19.x is not supported for this level of fabric.", However, if I use version v0.16.0, there is error in step 3) Install the business network saying that this version does not support command "composer network install ...".

Any help?

Thx in advance.

gnurtcouq commented 5 years ago

Hi,

I managed to step 2) Start fabric and create peer admin card with composer version is now v0.19.4 by setting export FABRIC_VERSION=hlfv11, then:

./createPeerAdminCard.sh

Then, doing step 3) Install the business network: cd ../

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

✔ Installing business network. This may take a minute... Successfully installed business network clp-network, version 0.0.1

Command succeeded

Next, for step 4) Start the business network:

composer network start --networkName clp-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card Starting business network clp-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: No valid responses from any peers. Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: Unknown chaincodeType: NODE) Command failed

Any idea how to fix this?

raheelzubairy commented 5 years ago

@gnurtcouq Are you still seeing this error? Recommendation would be to start with clean Fabric setup (i.e removing previous docker containers and images)

gnurtcouq commented 5 years ago

Yes, you are right. Just start with clean Fabric/Docker & this issue is fixed. Thx a lot

raheelzubairy commented 5 years ago

Sounds good