请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

链码实例化报错

root@35804f1d7b7e:/opt/gopath/src/github.com/hyperledger/fabric# peer chaincode instantiate -o orderer.imocc.com:7050 -C assetschannel -n assetsexchange -l golang -v 1.0.0 -c ‘{“Args”:[“init”]}’ -P "OR(‘org0MSP.member’,‘org1MSP.admin’)"
2020-04-08 05:02:46.762 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-04-08 05:02:46.762 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-04-08 05:02:46.765 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-04-08 05:02:46.765 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-04-08 05:02:46.767 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6B08031A0C08F6B5B5F40510…535010010A04657363630A0476736363
2020-04-08 05:02:46.767 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: B631B10EE36ED1DFDC9CD6FFE880DA0AB5E874B7EFA66602F453F5FB25051CF2
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Timeout expired while starting chaincode assetsexchange:1.0.0(networkid:dev,peerid:peer0.org1.imocc.com,tx:cce588a1cebfad798aa9d8c8dee7baaced6f7ed7a7df145a4bdad90236773e85)
Usage:
peer chaincode instantiate [flags]

Flags:
-C, --channelID string The channel on which this command should be executed (default “testchainid”)
-c, --ctor string Constructor message for the chaincode in JSON format (default “{}”)
-E, --escc string The name of the endorsement system chaincode to be used for this chaincode
-l, --lang string Language the chaincode is written in (default “golang”)
-n, --name string Name of the chaincode
-P, --policy string The endorsement policy associated to this chaincode
-v, --version string Version of the chaincode specified in install/instantiate/upgrade commands
-V, --vscc string The name of the verification system chaincode to be used for this chaincode

Global Flags:
–cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
–logging-level string Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string Ordering service endpoint
–test.coverprofile string Done (default “coverage.cov”)
–tls Use TLS when communicating with the orderer endpoint

正在回答

1回答

这是客户端cli这边的等待时间过短造成的。可以适当延长等待时间,这个过程会编译链码镜像,而且如果基础镜像本地没有,会实时去拉取,看网速

0 回复 有任何疑惑可以回复我~
  • 提问者 慕婉清1725868 #1
    老师~等待时间在哪设置,我看peer的命令中没有设置等待时间的参数。
    回复 有任何疑惑可以回复我~ 2020-04-09 12:18:59
  • 提问者 慕婉清1725868 #2
    我后来把创世区块删除了,重新生成一个创世区块就好了。是不是这个创世区块只能用一次?
    回复 有任何疑惑可以回复我~ 2020-04-09 12:19:33
  • 自游蜗牛 回复 提问者 慕婉清1725868 #3
    我记得是有的,-t试试。如果是高版本的,需要help一下。如果实在没有的话,查看peer下的core.yaml设置,里面跟chaincode相关的两个基础镜像,builder跟baseos,你提前下载下来,会加快编译的速度。
    回复 有任何疑惑可以回复我~ 2020-04-09 12:21:40
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信