hyperledger-labs / fabric-opssc

Operations Smart Contract (OpsSC) for Hyperledger Fabric v2.x
Apache License 2.0
25 stars 10 forks source link

Following the readme ends in failure. #7

Open toddinpal opened 3 years ago

toddinpal commented 3 years ago

I'm following the steps in the README and when I get to the step to create the ops channel and then deploy the OpsSC chaincodes, I get the following errors: obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ ./network.sh createChannel -c ${OPS_CHANNEL_ID} Creating channel 'ops-channel'. If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb Generating channel create transaction 'ops-channel.tx'

obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ export OPS_CC_NAME=channel_ops obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ echo $OPS_CC_NAME channel_ops obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ ./network.sh deployCC -c ${OPS_CHANNEL_ID} -ccn ${OPS_CC_NAME} -ccp ../../../chaincode/${OPS_CC_NAME} -ccl go deploying chaincode on channel 'ops-channel' executing with the following

Any help would be appreciated.

satota2 commented 3 years ago

Thank you for your report.

This failure seems to have occurred because the channel_ops chaincode is already installed on peer0.org1 (fabric-samples which OpsSC uses does not consider such case).

This might have happened because of old network environment remaining.

Please try to clean up the network first by using the following commands:

$ cd ${FABRIC_OPSSC}/integration
$ ./teardownDockerEnv.sh

Then, please rerun from this step.

If it still does not work, we need more information and logs. Result of executing docker ps -a command and/or docker logs command may be useful for analyzing the cause.