Error deploying chaincode to Hyperledger Fabric 2 test-network (with javascript tag)

768 Views Asked by At

I'm just playing for a demo with Hyperledger Fabric 2 test-network example:

Github repo link

Hyperledger Doc

I'm having issues deploying chaincode to the test network, with Javascrip tag, executing the command below:

./network.sh deployCC -ccl javascript

The ERROR I'm getting is the following:

Chaincode definition approved on peer0.org1 on channel 'mychannel' failed
Deploying chaincode failed

The result of the log is as follows:

alex@alex:~/hl-fabric/fabric-samples/test-network$ ./network.sh deployCC -ccl javascript
deploying chaincode on channel 'mychannel'
executing with the following
- CHANNEL_NAME: mychannel
- CC_NAME: basic
- CC_SRC_PATH: NA
- CC_SRC_LANGUAGE: javascript
- 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
Determining the path to the chaincode
asset-transfer-basic
+ peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-javascript/ --lang node --label basic_1.0
+ res=0
Chaincode is packaged
Installing chaincode on peer0.org1...
Using organization 1
+ peer lifecycle chaincode install basic.tar.gz
+ res=0
Chaincode is installed on peer0.org1
Install chaincode on peer0.org2...
Using organization 2
+ peer lifecycle chaincode install basic.tar.gz
+ res=0
Chaincode is installed on peer0.org2
Using organization 1
+ peer lifecycle chaincode queryinstalled
+ res=0
Query installed successful on peer0.org1 on channel
Using organization 1
+ peer lifecycle chaincode approveformyorg -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /home/alex/hl-fabric/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --channelID mychannel --name basic --version 1.0 --package-id --sequence 1
+ res=1
Chaincode definition approved on peer0.org1 on channel 'mychannel' failed
Deploying chaincode failed
0

There are 0 best solutions below