chaincode安装失败:Error getting chaincode code chaincode: <go, [env]>: failed with error: "exec: not ...

CodingCode · · 842 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

Chaincode安装失败,碰到如下错误:

2018-09-06 10:00:43.959 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-09-06 10:00:43.959 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: Error getting chaincode code chaincode: <go, [env]>: failed with error: "exec: not started"

Usage:
peer chaincode install [flags]

Flags:
-c, --ctor string Constructor message for the chaincode in JSON format (default "{}")
-l, --lang string Language the chaincode is written in (default "golang")
-n, --name string Name of the chaincode
-p, --path string Path to chaincode
-v, --version string Version of the chaincode specified in install/instantiate/upgrade commands

Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth Use mutual TLS when communicating with the orderer endpoint
--keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string Ordering service endpoint
--ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
--tls Use TLS when communicating with the orderer endpoint
--transient string Transient map of arguments in JSON encoding

根本原因是什么:
安装chaincode不在支持在peer的container里面进行了,必须在CLI的container里面操作:

Root Cause:

The issue is that you can no longer use the peer container as the CLI. You should use the fabric-tools container instead.
Please note the change in the e2e compose file here: https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/docker-compose-cli.yaml#L42
Please try the fabric-tools image and things should work
FYI - the error is due to the fact that the Go compiler is no included in the fabric-peer image and it is now required when using the CLI to package chaincode


有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

842 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传