在Fabric-samples中使用couchdb选项时,无法实例化Hyperledger fabric 1.3中的chaincode

时间:2018-12-17 18:01:44

标签: hyperledger-fabric

我正在从此处关注私有数据教程: https://hyperledger-fabric.readthedocs.io/en/release-1.3/private_data_tutorial.html

当我像这样运行byfn.sh脚本时:

./byfn.sh up -s couchdb

我可以从first-network文件夹到达安装网络的位置,但是它在实例化时就消失了。

我遇到的错误是以下两个错误之一:

Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=1
+ set +x
2018-12-17 17:45:57.641 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-17 17:45:57.641 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: error endorsing chaincode: rpc error: code = Unavailable desc = transport is closing
!!!!!!!!!!!!!!! Chaincode instantiation on peer0.org2 on channel 'mychannel' failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

或者这个:

Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=1
+ set +x
2018-12-17 17:58:36.995 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-17 17:58:36.995 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "/opt/go/pkg/tool/linux_amd64/link: signal: killed
"
!!!!!!!!!!!!!!! Chaincode instantiation on peer0.org2 on channel 'mychannel' failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

如果我不使用-s couchdb参数,它将毫无问题地工作。

我正在Ubuntu 18.04上运行此程序,并且已安装所有先决条件。关于我可能做错了什么的想法?

更新: 这是peer0.org2的一些Docker日志

2018-12-17 20:29:55.296 UTC [gossip/gossip] handleMessage -> WARN 047 Message GossipMessage: tag:CHAN_OR_ORG state_info:<timestamp:<inc_num:1545078583282595060 seq_num:1545078592853991651 > pki_id:"9\350\367\340\200G\2306\360!\r\342\221$\013O\315\377~\303'\263\224\234\323OtS\266^Y\204" channel_MAC:"7oV\232\272;n\213c\264\364+d\323\274\234\370\253\277\337\375\255\375\003\240>=\007\026\323\317\316" properties:<ledger_heigh
t:2 > > , Envelope: 98 bytes, Signature: 70 bytes isn't valid
2018-12-17 20:29:55.873 UTC [gossip/privdata] StoreBlock -> INFO 048 [mychannel] Received block [2] from buffer
2018-12-17 20:29:55.894 UTC [gossip/gossip] JoinChan -> INFO 049 Joining gossip network of channel mychannel with 2 organizations
2018-12-17 20:29:55.904 UTC [gossip/gossip] learnAnchorPeers -> INFO 04a Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}]
2018-12-17 20:29:55.904 UTC [gossip/gossip] learnAnchorPeers -> INFO 04b Learning about the configured anchor peers of Org2MSP for channel mychannel : [{peer0.org2.example.com 7051}]
2018-12-17 20:29:55.904 UTC [gossip/gossip] learnAnchorPeers -> INFO 04c Anchor peer with same endpoint, skipping connecting to myself
2018-12-17 20:29:55.905 UTC [committer/txvalidator] Validate -> INFO 04d [mychannel] Validated block [2] in 31ms
2018-12-17 20:29:55.990 UTC [kvledger] CommitWithPvtData -> INFO 04e [mychannel] Committed block [2] with 1 transaction(s) in 83ms (state_validation=0ms block_commit=19ms state_commit=55ms)
2018-12-17 20:30:00.051 UTC [endorser] callChaincode -> INFO 04f [][9f6b48cc] Entry chaincode: name:"lscc"
2018-12-17 20:30:00.074 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 050 Created state database mychannel_lscc
2018-12-17 20:30:00.076 UTC [lscc] executeInstall -> INFO 051 Installed Chaincode [mycc] Version [1.0] to peer
2018-12-17 20:30:00.076 UTC [endorser] callChaincode -> INFO 052 [][9f6b48cc] Exit chaincode: name:"lscc"  (25ms)
2018-12-17 20:30:00.169 UTC [endorser] callChaincode -> INFO 053 [mychannel][9656eaad] Entry chaincode: name:"lscc"
2018-12-17 20:30:00.204 UTC [golang-platform] GenerateDockerBuild -> INFO 054 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2018-12-17 20:30:00.204 UTC [golang-platform] GenerateDockerBuild -> INFO 055 building chaincode with tags:
2018-12-17 20:31:04.525 UTC [gossip/discovery] getDeadMembers -> WARN 056 Haven't heard from [242 171 107 244 150 35 129 53 213 6 101 53 106 212 63 160 250 230 42 248 213 246 136 122 133 191 100 41 243 29 153 133] for 27.909647593s
2018-12-17 20:31:44.018 UTC [gossip/discovery] getDeadMembers -> WARN 057 Haven't heard from [73 47 250 236 221 95 181 79 20 161 111 61 168 177 21 136 172 73 40 70 233 52 227 86 153 143 180 44 99 176 246 248] for 1m19.691918704s
2018-12-17 20:31:44.018 UTC [gossip/discovery] getDeadMembers -> WARN 058 Haven't heard from [57 232 247 224 128 71 152 54 240 33 13 226 145 36 11 79 205 255 126 195 39 179 148 156 211 79 116 83 182 94 89 132] for 1m19.695671013s
2018-12-17 20:31:44.018 UTC [gossip/discovery] expireDeadMembers -> WARN 059 Entering [[242 171 107 244 150 35 129 53 213 6 101 53 106 212 63 160 250 230 42 248 213 246 136 122 133 191 100 41 243 29 153 133] [73 47 250 236 221 95 181 79 20 161 111 61 168 177 21 136 172 73 40 70 233 52 227 86 153 143 180 44 99 176 246 248] [57 232 247 224 128 71 152 54 240 33 13 226 145 36 11 79 205 255 126 195 39 179 148 156 211 79 116 8
3 182 94 89 132]]
2018-12-17 20:31:44.018 UTC [gossip/discovery] expireDeadMembers -> WARN 05a Closing connection to Endpoint: peer1.org2.example.com:7051, InternalEndpoint: peer1.org2.example.com:7051, PKI-ID: [242 171 107 244 150 35 129 53 213 6 101 53 106 212 63 160 250 230 42 248 213 246 136 122 133 191 100 41 243 29 153 133], Metadata: []
2018-12-17 20:31:44.018 UTC [gossip/discovery] expireDeadMembers -> WARN 05b Closing connection to Endpoint: peer0.org1.example.com:7051, InternalEndpoint: , PKI-ID: [73 47 250 236 221 95 181 79 20 161 111 61 168 177 21 136 172 73 40 70 233 52 227 86 153 143 180 44 99 176 246 248], Metadata: []
2018-12-17 20:31:44.018 UTC [gossip/discovery] expireDeadMembers -> WARN 05c Closing connection to Endpoint: peer1.org1.example.com:7051, InternalEndpoint: , PKI-ID: [57 232 247 224 128 71 152 54 240 33 13 226 145 36 11 79 205 255 126 195 39 179 148 156 211 79 116 83 182 94 89 132], Metadata: []
2018-12-17 20:31:44.018 UTC [gossip/discovery] expireDeadMembers -> WARN 05d Exiting
2018-12-17 20:31:45.042 UTC [chaincode-platform] func1 -> ERRO 05e Failed to generate platform-specific docker build: Error returned from build: 1 "/opt/go/pkg/tool/linux_amd64/link: signal: killed
"
2018-12-17 20:31:45.046 UTC [dockercontroller] deployImage -> ERRO 05f Error building images: Failed to generate platform-specific docker build: Error returned from build: 1 "/opt/go/pkg/tool/linux_amd64/link: signal: killed
"
2018-12-17 20:31:45.047 UTC [dockercontroller] deployImage -> ERRO 060 Image Output:
********************

********************
2018-12-17 20:31:45.061 UTC [endorser] callChaincode -> INFO 061 [mychannel][9656eaad] Exit chaincode: name:"lscc"  (104891ms)
2018-12-17 20:31:45.061 UTC [endorser] SimulateProposal -> ERRO 062 [mychannel][9656eaad] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "/opt/go/pkg/tool/linux_amd64/link: signal: killed
"
error starting container
error starting container

1 个答案:

答案 0 :(得分:1)

错误class LoggingButton extends Component { handleClick=()=>{ console.log('this is :', this) } render() { return ( <div className="App"> <button onClick={this.handleClick}>Click Me</button> </div> ); } }表示其存在内存限制问题,网络需要更多资源来运行。 (请参阅问题下方的评论)