每当我尝试根据MagnetoCorp 示例实例化合约时,都会收到以下错误。在终端:
2019-03-06 14:18:49.695 UTC [chaincodeCmd] InitCmdFactory -> INFO 001 Retrieved channel (mychannel) orderer endpoint: orderer.example.com:7050
2019-03-06 14:18:49.697 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc
2019-03-06 14:18:49.697 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg cannot get package for chaincode (papercontract:0)
和monitordocker
输出:
peer0.org1.example.com|2019-03-06 14:26:51.556 UTC [endorser] callChaincode -> INFO 04e [][9f290f94] Entry chaincode: name:"cscc"
peer0.org1.example.com|2019-03-06 14:26:51.557 UTC [endorser] callChaincode -> INFO 04f [][9f290f94] Exit chaincode: name:"cscc" (1ms)
peer0.org1.example.com|2019-03-06 14:26:51.557 UTC [comm.grpc.server] 1 -> INFO 050 unary call completed {"grpc.start_time": "2019-03-06T14:26:51.555Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.21.0.7:35966", "grpc.code": "OK", "grpc.call_duration": "1.572108ms"}
peer0.org1.example.com|2019-03-06 14:26:51.566 UTC [endorser] callChaincode -> INFO 051 [mychannel][ffd5a8c0] Entry chaincode: name:"lscc"
peer0.org1.example.com|2019-03-06 14:26:51.566 UTC [lscc] executeDeployOrUpgrade -> ERRO 052 cannot get package for chaincode (papercontract:0)-err:open /var/hyperledger/production/chaincodes/papercontract.0: no such file or directory
peer0.org1.example.com|2019-03-06 14:26:51.566 UTC [endorser] callChaincode -> INFO 053 [mychannel][ffd5a8c0] Exit chaincode: name:"lscc" (0ms)
peer0.org1.example.com|2019-03-06 14:26:51.566 UTC [endorser] ProcessProposal -> ERRO 054 [mychannel][ffd5a8c0] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: ffd5a8c09f7f5bc101b8caf0631a28ff222be0df90a94ac9c41b939dba7bd208
peer0.org1.example.com|2019-03-06 14:26:51.566 UTC [comm.grpc.server] 1 -> INFO 055 unary call completed {"grpc.start_time": "2019-03-06T14:26:51.565Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.21.0.7:35966", "grpc.code": "OK", "grpc.call_duration": "988.672µs"}
orderer.example.com|2019-03-06 14:26:51.570 UTC [orderer.common.broadcast] Handle -> WARN 00f Error reading from 172.21.0.7:47540: rpc error: code = Canceled desc = context canceled
orderer.example.com|2019-03-06 14:26:51.570 UTC [comm.grpc.server] 1 -> INFO 010 streaming call completed {"grpc.start_time": "2019-03-06T14:26:51.566Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Broadcast", "grpc.peer_address": "172.21.0.7:47540", "error": "rpc error: code = Canceled desc = context canceled", "grpc.code": "Canceled", "grpc.call_duration": "4.646613ms"}
对我来说唯一有意义的是:
executeDeployOrUpgrade -> ERRO 052 cannot get package for chaincode (papercontract:0)-err:open /var/hyperledger/production/chaincodes/papercontract.0: no such file or directory
因为/var/hyperledger
我的系统中不存在该目录。