Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Following the readme ends in failure. #7

Open
toddinpal opened this issue Apr 14, 2021 · 1 comment
Open

Following the readme ends in failure. #7

toddinpal opened this issue Apr 14, 2021 · 1 comment

Comments

@toddinpal
Copy link

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'

  • configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/ops-channel.tx -channelID ops-channel
    2021-04-14 16:51:53.777 MDT [common.tools.configtxgen] main -> INFO 001 Loading configuration
    2021-04-14 16:51:53.810 MDT [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/configtx/configtx.yaml
    2021-04-14 16:51:53.810 MDT [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 003 Generating new channel configtx
    2021-04-14 16:51:53.818 MDT [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 004 Writing new channel tx
  • res=0
    Generating anchor peer update transactions
    Generating anchor peer update transaction for Org1MSP
  • configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID ops-channel -asOrg Org1MSP
    2021-04-14 16:51:53.894 MDT [common.tools.configtxgen] main -> INFO 001 Loading configuration
    2021-04-14 16:51:53.947 MDT [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/configtx/configtx.yaml
    2021-04-14 16:51:53.947 MDT [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update
    2021-04-14 16:51:53.951 MDT [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update
  • res=0
    Generating anchor peer update transaction for Org2MSP
  • configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID ops-channel -asOrg Org2MSP
    2021-04-14 16:51:54.034 MDT [common.tools.configtxgen] main -> INFO 001 Loading configuration
    2021-04-14 16:51:54.069 MDT [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/configtx/configtx.yaml
    2021-04-14 16:51:54.069 MDT [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Generating anchor peer update
    2021-04-14 16:51:54.075 MDT [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 004 Writing anchor peer update
  • res=0
    Creating channel ops-channel
    Using organization 1
  • peer channel create -o localhost:7050 -c ops-channel --ordererTLSHostnameOverride orderer0.org1.example.com -f ./channel-artifacts/ops-channel.tx --outputBlock ./channel-artifacts/ops-channel.block --tls --cafile /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c ops-channel --ordererTLSHostnameOverride orderer0.org1.example.com -f ./channel-artifacts/ops-channel.tx --outputBlock ./channel-artifacts/ops-channel.block --tls --cafile /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c ops-channel --ordererTLSHostnameOverride orderer0.org1.example.com -f ./channel-artifacts/ops-channel.tx --outputBlock ./channel-artifacts/ops-channel.block --tls --cafile /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c ops-channel --ordererTLSHostnameOverride orderer0.org1.example.com -f ./channel-artifacts/ops-channel.tx --outputBlock ./channel-artifacts/ops-channel.block --tls --cafile /home/obptools/fabric-opssc/sample-environments/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/orderers/orderer0.org1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
    2021-04-14 16:52:06.394 MDT [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
    Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'ops-channel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1
    Channel creation failed
    Create channel failed
    obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$ echo $OPS_CC_NAME

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

  • CHANNEL_NAME: ops-channel
  • CC_NAME: channel_ops
  • CC_SRC_PATH: ../../../chaincode/channel_ops
  • CC_SRC_LANGUAGE: go
  • CC_VERSION: 1.0
  • CC_SEQUENCE: 1
  • CC_END_POLICY: NA
  • CC_COLL_CONFIG: NA
  • CC_INIT_FCN: NA
  • DELAY: 3
  • MAX_RETRY: 5
  • VERBOSE: false
    Vendoring Go dependencies at ../../../chaincode/channel_ops
    ~/fabric-opssc/chaincode/channel_ops ~/fabric-opssc/sample-environments/fabric-samples/test-network
    ~/fabric-opssc/sample-environments/fabric-samples/test-network
    Finished vendoring Go dependencies
  • peer lifecycle chaincode package channel_ops.tar.gz --path ../../../chaincode/channel_ops --lang golang --label channel_ops_1.0
  • res=0
    Chaincode is packaged
    Installing chaincode on peer0.org1...
    Using organization 1
  • peer lifecycle chaincode install channel_ops.tar.gz
  • res=1
    Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': chaincode already successfully installed
    Chaincode installation on peer0.org1 has failed
    Deploying chaincode failed
    obptools@ochain:~/fabric-opssc/sample-environments/fabric-samples/test-network$

Any help would be appreciated.

@satota2
Copy link
Contributor

satota2 commented Apr 16, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants