简体   繁体   中英

Hyperledger Fabric: peer chaincode instantiate error: "could not assemble transaction " "msg chaincode registration failed"

We are trying to instantiate the sample chaincode github.com/chaincode/chaincode_example02/go/ in a sample network, and we get the following error message... any suggestions where to look at?

CLI logs:

Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0

Peer Logs:

2020-10-29 15:20:31.341 UTC [gossip.comm] sendToEndpoint -> DEBU 5ed1 Exiting
2020-10-29 15:20:31.397 UTC [chaincode] Launch -> DEBU 5ed2 stopping due to error while launching: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed
2020-10-29 15:20:31.397 UTC [container] lockContainer -> DEBU 5ed3 waiting for container(mycc-1.0) lock
2020-10-29 15:20:31.397 UTC [container] lockContainer -> DEBU 5ed4 got container (mycc-1.0) lock
2020-10-29 15:20:31.417 UTC [container] unlockContainer -> DEBU 5edb container lock deleted(mycc-1.0)
2020-10-29 15:20:31.417 UTC [chaincode] Launch -> DEBU 5edc launch complete
2020-10-29 15:20:31.417 UTC [chaincode] Deregister -> DEBU 5edd deregister handler: mycc:1.0
2020-10-29 15:20:31.417 UTC [endorser] callChaincode -> INFO 5ede [mychannel][502c46f0] Exit chaincode: name:"lscc"  (35376ms)
2020-10-29 15:20:31.417 UTC [endorser] SimulateProposal -> ERRO 5edf [mychannel][502c46f0] failed to invoke chaincode name:"lscc" , error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
        /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed
2020-10-29 15:20:31.417 UTC [endorser] SimulateProposal -> DEBU 5ee0 [mychannel][502c46f0] Exit
2020-10-29 15:20:31.417 UTC [lockbasedtxmgr] Done -> DEBU 5ee1 Done with transaction simulation / query execution [502c46f068a775e5966ee76e646b9444410e582877e12bd2b69aa89102061299]
2020-10-29 15:20:31.417 UTC [endorser] func1 -> DEBU 5ee2 Exit: request from 192.168.0.6:50290

The problem was caused by having a docker-compose network name which was not the default name (byfn). It was fixed by adding the environ variable CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE to the right name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM